Skip to content

Commit

Permalink
Chore: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Sep 6, 2022
1 parent ae6a86a commit 0092aa6
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY: "r.planetary-quantum.com"
DOCKER_REPO: "buildpacks"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.19
- uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.BP_QUANTUM_DOCKER_USERNAME }}
password: ${{ secrets.BP_QUANTUM_DOCKER_PASSWORD }}
- run: make build
- uses: buildpacks/github-actions/setup-pack@v4.8.1
- 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="${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPO }}/$(echo "$BP_ID" | sed 's/\//_/g')"
echo "::set-output name=package::$PACKAGE"
echo "::set-output name=version::$VERSION"
- run: pack buildpack package --publish ${{ steps.package.outputs.package }}:${{ steps.package.outputs.version }}

# - id: crane
# run: |
# #!/usr/bin/env bash
# DIGEST="$(crane digest ${{ steps.package.outputs.package }}:${{ steps.package.outputs.version }})"
# echo "::set-output name=address::${PACKAGE}@${DIGEST}"

# - id: register
# uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:4.4.0
# with:
# token: ${{ secrets.PUBLIC_REPO_TOKEN }}
# id: ${{ steps.package.outputs.bp_id }}
# version: ${{ steps.package.outputs.version }}
# address: ${{ steps.crane.outputs.address }}

0 comments on commit 0092aa6

Please sign in to comment.