Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
  • Loading branch information
fagiani committed Mar 12, 2021
1 parent 6c04e41 commit 7c2d0f8
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
name: Release
on:
release:
types:
- published
release:
types:
- published
jobs:
register:
name: Package, Publish, and Register
runs-on:
- ubuntu-latest
steps:
- id: checkout
name: Checkout code
uses: actions/checkout@v2
- if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }}
name: Login to GitHub Package Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- id: setup-pack
uses: buildpacks/github-actions/[email protected]
- id: package
run: |
#!/usr/bin/env bash
set -euo pipefail
BP_ID="$(cat buildpack.toml | yj -t | jq -r .buildpack.id)"
VERSION="$(cat buildpack.toml | yj -t | jq -r .buildpack.version)"
PACKAGE="${REPO}/$(echo "$BP_ID" | sed 's/\//_/g')"
pack package-buildpack --publish ${PACKAGE}:${VERSION}
DIGEST="$(crane digest ${PACKAGE}:${VERSION})"
echo "::set-output name=bp_id::$BP_ID"
echo "::set-output name=version::$VERSION"
echo "::set-output name=address::${PACKAGE}@${DIGEST}"
shell: bash
env:
REPO: ghcr.io/${{ github.repository_owner }}/buildpacks
- id: register
uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:4.1.0
with:
token: ${{ secrets.PUBLIC_REPO_TOKEN }}
id: ${{ steps.package.outputs.bp_id }}
version: ${{ steps.package.outputs.version }}
address: ${{ steps.package.outputs.address }}
register:
name: Package, Publish, and Register
runs-on:
- ubuntu-latest
steps:
- id: checkout
name: Checkout code
uses: actions/checkout@v2
- if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }}
name: Login to GitHub Package Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- id: setup-pack
uses: buildpacks/github-actions/[email protected]
- id: package
run: |
#!/usr/bin/env bash
set -euo pipefail
BP_ID="$(cat buildpack.toml | yj -t | jq -r .buildpack.id)"
VERSION="$(cat buildpack.toml | yj -t | jq -r .buildpack.version)"
PACKAGE="${REPO}/$(echo "$BP_ID" | sed 's/\//_/g')"
pack buildpack package --publish ${PACKAGE}:${VERSION}
DIGEST="$(crane digest ${PACKAGE}:${VERSION})"
echo "::set-output name=bp_id::$BP_ID"
echo "::set-output name=version::$VERSION"
echo "::set-output name=address::${PACKAGE}@${DIGEST}"
shell: bash
env:
REPO: ghcr.io/${{ github.repository_owner }}/buildpacks
- id: register
uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:4.1.0
with:
token: ${{ secrets.PUBLIC_REPO_TOKEN }}
id: ${{ steps.package.outputs.bp_id }}
version: ${{ steps.package.outputs.version }}
address: ${{ steps.package.outputs.address }}

0 comments on commit 7c2d0f8

Please sign in to comment.