1
0
Fork 0
mirror of https://github.com/imjasonh/setup-pack synced 2026-07-07 02:32:24 +00:00
No description
Find a file
2021-04-28 22:41:45 -04:00
.github/workflows rename, format 2021-04-28 22:37:16 -04:00
action.yml cmd/pack 2021-04-28 22:27:11 -04:00
LICENSE add LICENSE, test with publish 2021-04-28 22:31:52 -04:00
main.go add LICENSE, test with publish 2021-04-28 22:31:52 -04:00
README.md flesh out README 2021-04-28 22:41:45 -04:00

GitHub Action to install and setup the Buildpacks pack CLI

Build

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 ...