This GitHub Action enables you to interacting with remote images and registries using crane
. This action will verify the integrity of the crane
release during installation if you setup SLSA 3 provenance (see notes and examples below).
For a quick start guide on the usage of crane
, please refer to https://github.com/google/go-containerregistry/blob/main/cmd/crane/recipes.md. For available crane releases, see https://github.com/google/go-containerregistry/releases.
The following tags are available for the iarekylew00t/crane-installer
action.
main
<version>
(eg:v1.0.1
, including:v1.0
,v1
, etc.)
This action currently supports GitHub-provided Linux, macOS and Windows runners (self-hosted runners may not work). MacOS and Windows runners do not work with the slsa-verifier action, so integrity validation is skipped for those.
Add the following entry to your Github workflow YAML file:
uses: iarekylew00t/crane-installer@v1
with:
crane-release: v0.14.0 # optional
input | Description | Default |
---|---|---|
crane-release |
crane release version to be installed |
latest |
install-dir |
directory to install crane binary |
$HOME/.crane |
username |
username to use for GitHub authentication | ${{ github.actor }} |
token |
token to use for GitHub authentication | ${{ github.token }} |
jobs:
crane:
runs-on: ubuntu-latest
steps:
- name: Install crane
uses: iarekylew00t/crane-installer@v1
with:
crane-release: v0.14.0
- name: Check install
run: crane version
jobs:
crane:
runs-on: ubuntu-latest
steps:
- name: Install crane
uses: iarekylew00t/crane-installer@v1
- name: Check install
run: crane version
jobs:
crane:
runs-on: ubuntu-latest
steps:
- uses: iarekylew00t/crane-installer@v1
- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKERHUB_TOKEN }}" | \
crane auth login docker.io \
--username "${{ vars.DOCKERHUB_USERNAME }}" \
--password-stdin
jobs:
crane:
runs-on: ubuntu-latest
steps:
- name: Install SLSA verifier
uses: slsa-framework/slsa-verifier/actions/installer@v2.0.1
- name: Install crane
uses: iarekylew00t/crane-installer@v1
- name: Check install
run: crane version
Feel free to contribute and make things better by opening an Issue or Pull Request.
See LICENSE.