Skip to content

Commit

Permalink
ci: try with app token for release (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
chgl authored Nov 30, 2024
1 parent eee1a35 commit 0bdbe2c
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions: read-all

jobs:
build:
uses: chgl/.github/.github/workflows/standard-build.yaml@bc38fcaae865b5c200914fdf58239ba902a13842 # v1.8.5
uses: chgl/.github/.github/workflows/standard-build.yaml@162c01b19aa71d96483ecdcda74d4993121bff1f # v1.9.1
permissions:
contents: write
id-token: write
Expand All @@ -27,7 +27,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

lint:
uses: chgl/.github/.github/workflows/standard-lint.yaml@bc38fcaae865b5c200914fdf58239ba902a13842 # v1.8.5
uses: chgl/.github/.github/workflows/standard-lint.yaml@162c01b19aa71d96483ecdcda74d4993121bff1f # v1.9.1
permissions:
contents: read
pull-requests: write
Expand All @@ -41,32 +41,17 @@ jobs:
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}

create-release-token:
runs-on: ubuntu-24.04
if: ${{ github.event_name != 'pull_request' }}
outputs:
token: ${{ steps.app-token.outputs.token }}
steps:
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: ${{ secrets.RELEASER_APP_ID }}
private-key: ${{ secrets.RELEASER_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
kube-powertools
release:
uses: chgl/.github/.github/workflows/standard-release.yaml@bc38fcaae865b5c200914fdf58239ba902a13842 # v1.8.5
uses: chgl/.github/.github/workflows/standard-release.yaml@162c01b19aa71d96483ecdcda74d4993121bff1f # v1.9.1
needs:
- build
- create-release-token
permissions:
contents: write
pull-requests: write
issues: write
secrets:
semantic-release-token: ${{ needs.create-release-token.outputs.token }}
app-token-app-id: ${{ secrets.RELEASER_APP_ID }}
app-token-private-key: ${{ secrets.RELEASER_APP_PRIVATE_KEY }}

copy-image-to-dockerhub:
name: copy ghcr.io image to DockerHub
Expand Down

0 comments on commit 0bdbe2c

Please sign in to comment.