fix: replace setup-crane step with copypasta #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: bhearsumtest | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
docker: | |
name: Docker Images | |
runs-on: ubuntu-22.04 | |
environment: build | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
# copypasta from https://github.com/imjasonh/setup-crane/blob/main/action.yml | |
- name: Set up crane | |
shell: bash | |
run: | | |
out=crane | |
os=${{ runner.os }} | |
tag=$(curl -s -u "username:${{ github.token }}" https://api.github.com/repos/google/go-containerregistry/releases/latest | jq -r '.tag_name') | |
arch=$(uname -m) | |
tmp=$(mktemp -d) | |
cd ${tmp} | |
echo curl -fsL https://github.com/google/go-containerregistry/releases/download/${tag}/go-containerregistry_${os}_${arch}.tar.gz | tar xz ${out} | |
curl -fsL https://github.com/google/go-containerregistry/releases/download/${tag}/go-containerregistry_${os}_${arch}.tar.gz | tar xz ${out} | |
chmod +x ${tmp}/${out} | |
PATH=${PATH}:${tmp} | |
echo "${tmp}" >> $GITHUB_PATH | |
echo "${{ github.token }}" | crane auth login ghcr.io --username "dummy" --password-stdin |