Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StepSecurity Maintained Action

GitHub Action to install and setup crane

Build

Example usage

name: Publish

on:
  push:
    branches: ['main']

jobs:
  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-go@v7
        with:
          go-version: 1.15
      - uses: actions/checkout@v7

      - uses: step-security/setup-crane@v0
      - run: |
        crane digest ubuntu
        crane manifest ubuntu | jq
        crane copy ubuntu ghcr.io/${{ github.repository }}/ubuntu-copy

That's it! This workflow will inspect and copy the ubuntu image to your repo's GitHub container registry namespace.

The action works on Linux and macOS runners.

Select crane version to install

By default, step-security/setup-crane installs the latest released version of crane.

You can select a version with the version parameter:

- uses: step-security/setup-crane@v0
  with:
    version: v0.5.1

To build and install crane from source using go get, specify version: tip.

Pushing to other registries

By default, step-security/setup-crane configures crane to authorize requests to GitHub Container Registry, but you can configure it to use other registries as well.

To do this, you need to provide credentials to authorize the push. You can use encrypted secrets to store the authorization token, and pass it to crane auth login before pushing:

- uses: step-security/setup-crane@v1
- env:
    auth_token: ${{ secrets.auth_token }}
  run: |
    echo "${auth_token}" | crane auth login https://my.registry --username my-username --password-stdin
    crane digest my.registry/my/image

About

Secure drop-in replacement for imjasonh/setup-crane.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors