Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add token with adequate permissions for "📦 Create a WBS Release" #785

Merged
merged 4 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}