mirror of
https://github.com/imjasonh/setup-pack
synced 2026-07-07 02:32:24 +00:00
No description
| .github/workflows | ||
| action.yml | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
GitHub Action to install and setup the Buildpacks pack CLI
Example usage
name: Publish
on:
push:
branches: ['main']
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.15
- uses: actions/checkout@v2
- uses: imjasonh/setup-pack@main
- run: pack build ...
Learn more about pack build or other available CLI commands.
This action installs the pack CLI and configures credentials to authorize pushes to the GitHub Container Registry.
Select pack version to install
By default, imjasonh/setup-pack installs the latest released version of pack.
You can select a version with the version parameter:
- uses: imjasonh/setup-pack@main
with:
version: v0.17.0
To build and install pack from source using go get, specify version: tip.
Pushing to other registries
By default, imjasonh/setup-pack configures authorization so pack can push images to GitHub Container Registry, but you can configure it to push to 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 docker login before pushing:
- uses: imjasonh/setup-pack@main
- env:
auth_token: ${{ secrets.auth_token }}
run: |
echo "${auth_token}" | docker login https://my.registry --username my-username --password-stdin
pack build ...