Skip to content

Commit

Permalink
Chore(ci): publish go-generate to our registry
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Jan 21, 2025
1 parent 6e0969a commit 64f4d6f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/update-cli/go-generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
sources:
getRelease:
kind: githubrelease
spec:
token: "{{ requiredEnv .github.token }}"
owner: paketo-community
repository: go-generate
assert: "*.cnb"
versionFilter:
kind: latest
transformers:
- trimPrefix: 'v'

targets:
publish:
sourceid: getRelease
kind: shell
spec:
command: |
export version={{ source `getRelease` }}
skopeo copy \
"docker-archive:https://github.com/paketo-community/go-generate/releases/download/v${version}/go-generate-${version}.cnb" \
"docker://r.planetary-quantum.com/buildpacks/go-generate:${version}"
5 changes: 5 additions & 0 deletions .github/update-cli/values.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
github:
user: "GitHub Actions Bot"
email: "[email protected]"
username: "github-actions"
token: "UPDATECLI_GITHUB_TOKEN"
27 changes: 27 additions & 0 deletions .github/workflows/go-generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: go-generate

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: r.planetary-quantum.com
username: ${{ secrets.QUANTUM_REGISTRY_USERNAME }}
password: ${{ secrets.QUANTUM_REGISTRY_PASSWORD }}
- uses: warjiang/[email protected]
- uses: updatecli/updatecli-action@v2
- run: echo ${{ secrets.GITHUB_TOKEN }}
- env:
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
updatecli \
diff \
-c .github/update-cli/go-generate.yml \
-v .github/update-cli/values.yml

0 comments on commit 64f4d6f

Please sign in to comment.