Skip to content

Commit

Permalink
Merge pull request #5 from disneystreaming/dfrancoeur/token
Browse files Browse the repository at this point in the history
Generate token
  • Loading branch information
daddykotex committed Oct 24, 2023
2 parents c446bcc + b9a7515 commit 6bec945
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ jobs:
build:
name: Package and publish
runs-on: ubuntu-latest
permissions:
# workflow triggered from tag creation can't run w/o this permission
actions: write
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
Expand All @@ -37,9 +34,21 @@ jobs:
./scripts/auto-update.sh
# The original GITHUB_TOKEN has all it needs to create the tag
# but when it does, the CI workflow that should run, will not
# To workaround this issue, we create a temporary token, with more
# permissions to create tag
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: 412514
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create tag
uses: actions/github-script@v6
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
const { PUBLISH_VERSION } = process.env
const tag = `v${PUBLISH_VERSION}`;
Expand Down

0 comments on commit 6bec945

Please sign in to comment.