diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 20bf9695..73ca9646 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -23,6 +23,6 @@ permissions: jobs: labels: - runs-on: ubuntu-latest + runs-on: namespace-profile-btp-docs steps: - uses: fuxingloh/multi-labeler@v4 diff --git a/.github/workflows/pr-settings.yml b/.github/workflows/pr-settings.yml index 30b44077..8f348879 100644 --- a/.github/workflows/pr-settings.yml +++ b/.github/workflows/pr-settings.yml @@ -23,24 +23,35 @@ permissions: jobs: labels: - runs-on: ubuntu-latest + runs-on: namespace-profile-btp-docs steps: + - name: Configure 1Password + uses: 1password/load-secrets-action/configure@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2 + with: + service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + + - name: Load secrets + uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 # v2 + env: + PR_SLACK_WEBHOOK_URL: op://platform/slack-webhooks/pr-webhook + - name: Send GitHub Action trigger data to Slack workflow with reviewers if: ${{ tojson(github.event.pull_request.requested_reviewers) != '[]' && !github.event.pull_request.draft }} - uses: slackapi/slack-github-action@v2.0.0 - env: - SLACK_WEBHOOK_URL: ${{ secrets.PR_SLACK_WEBHOOK_URL }} + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: + webhook: ${{ env.PR_SLACK_WEBHOOK_URL }} + webhook-type: webhook-trigger payload: | { "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 }}" } + - name: Send GitHub Action trigger data to Slack workflow without reviewers if: ${{ !github.event.pull_request.draft }} - uses: slackapi/slack-github-action@v2.0.0 - env: - SLACK_WEBHOOK_URL: ${{ secrets.PR_SLACK_WEBHOOK_URL }} + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: + webhook: ${{ env.PR_SLACK_WEBHOOK_URL }} + webhook-type: webhook-trigger payload: | { "message": "${{ github.event.pull_request.title }} (by ${{ github.event.pull_request.user.login }}) -> ${{ github.event.pull_request.html_url }}"