Skip to content

Commit

Permalink
chore: Add token with adequate permissions for "📦 Create a WBS Releas…
Browse files Browse the repository at this point in the history
…e" (#785)
  • Loading branch information
lorenjohnson authored Oct 7, 2024
1 parent 77ef322 commit c614b96
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: "Setup Node and Docker build environment"
description: "Reusable action to set up the environment for builds and tests"
inputs:
github_user:
description: user to access GHCR
required: true
github_token:
description: token to access GHCR
required: true
Expand Down Expand Up @@ -37,7 +34,7 @@ runs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ inputs.github_user }}
username: ${{ github.repository_owner }}
password: ${{ inputs.github_token }}

- name: Set NX to run locally using Node vs in Docker dev runner container
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:

- uses: ./.github/actions/setup-environment
with:
github_user: ${{ github.repository_owner }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- run: ./nx lint
Expand All @@ -36,7 +35,6 @@ jobs:

- uses: ./.github/actions/setup-environment
with:
github_user: ${{ github.repository_owner }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push ${{ matrix.imageName }}
Expand Down Expand Up @@ -64,7 +62,6 @@ jobs:

- uses: ./.github/actions/setup-environment
with:
github_user: ${{ github.repository_owner }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: "Pull images from GHCR"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build_publish_image_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:

- uses: ./.github/actions/setup-environment
with:
github_user: ${{ github.repository_owner }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/login-action@v3
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ jobs:

- uses: ./.github/actions/setup-environment
with:
github_user: wikibase-suite-bot
github_token: ${{ secrets.GH_WBS_BOT_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/login-action@v3
with:
Expand All @@ -55,6 +54,7 @@ jobs:
git config --global user.name 'wikibase suite github actions bot'
git config --global user.email '[email protected]'
git remote set-url origin https://[email protected]/${{ github.repository }}
if [ "${{ inputs.dry_run }}" == "true" ]; then
DRY_RUN_FLAG="--dry-run"
Expand All @@ -69,3 +69,5 @@ jobs:
fi
./nx release $PROJECT_ARG $DRY_RUN_FLAG
env:
GH_WBS_BOT_TOKEN: ${{ secrets.GH_WBS_BOT_TOKEN }}

0 comments on commit c614b96

Please sign in to comment.