Skip to content

Commit 30d56b8

Browse files
authored
fix: pr labels (#110)
## Summary by Sourcery Update PR workflow to fetch secrets from 1Password and run on the `namespace-profile-btp-docs` runner. CI: - Load secrets from 1Password for the PR workflow. - Update the PR workflow runner to `namespace-profile-btp-docs`.
1 parent 7b1341e commit 30d56b8

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/workflows/pr-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ permissions:
2323

2424
jobs:
2525
labels:
26-
runs-on: ubuntu-latest
26+
runs-on: namespace-profile-btp-docs
2727
steps:
2828
- uses: fuxingloh/multi-labeler@v4

.github/workflows/pr-settings.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,35 @@ permissions:
2323

2424
jobs:
2525
labels:
26-
runs-on: ubuntu-latest
26+
runs-on: namespace-profile-btp-docs
2727
steps:
28+
- name: Configure 1Password
29+
uses: 1password/load-secrets-action/configure@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2
30+
with:
31+
service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
32+
33+
- name: Load secrets
34+
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2
35+
env:
36+
PR_SLACK_WEBHOOK_URL: op://platform/slack-webhooks/pr-webhook
37+
2838
- name: Send GitHub Action trigger data to Slack workflow with reviewers
2939
if: ${{ tojson(github.event.pull_request.requested_reviewers) != '[]' && !github.event.pull_request.draft }}
30-
uses: slackapi/slack-github-action@v2.0.0
31-
env:
32-
SLACK_WEBHOOK_URL: ${{ secrets.PR_SLACK_WEBHOOK_URL }}
40+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
3341
with:
42+
webhook: ${{ env.PR_SLACK_WEBHOOK_URL }}
43+
webhook-type: webhook-trigger
3444
payload: |
3545
{
3646
"message": "${{ github.event.pull_request.title }} (by ${{ github.event.pull_request.user.login }} and to be checked by ${{ join(github.event.pull_request.requested_reviewers.*.login, ', ') }}) -> ${{ github.event.pull_request.html_url }}"
3747
}
48+
3849
- name: Send GitHub Action trigger data to Slack workflow without reviewers
3950
if: ${{ !github.event.pull_request.draft }}
40-
uses: slackapi/slack-github-action@v2.0.0
41-
env:
42-
SLACK_WEBHOOK_URL: ${{ secrets.PR_SLACK_WEBHOOK_URL }}
51+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
4352
with:
53+
webhook: ${{ env.PR_SLACK_WEBHOOK_URL }}
54+
webhook-type: webhook-trigger
4455
payload: |
4556
{
4657
"message": "${{ github.event.pull_request.title }} (by ${{ github.event.pull_request.user.login }}) -> ${{ github.event.pull_request.html_url }}"

0 commit comments

Comments
 (0)