Skip to content

fix: replace setup-crane step with copypasta #5

fix: replace setup-crane step with copypasta

fix: replace setup-crane step with copypasta #5

Workflow file for this run

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