Skip to content

Commit

Permalink
Merge pull request #1252 from product-os/kyle/website-publish-permiss…
Browse files Browse the repository at this point in the history
…ions

Revert to automatic github token for website comments
  • Loading branch information
flowzone-app[bot] authored Nov 11, 2024
2 parents 1d2f6b2 + 86c6d2c commit b1d51a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/flowzone.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#permissions
permissions:
id-token: write # AWS GitHub OIDC provider
issues: read # List issue comments
packages: write # push manifests to ghcr.io
pull-requests: write # comment on PRs

Expand Down
10 changes: 6 additions & 4 deletions flowzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3357,7 +3357,9 @@ jobs:
(github.event.action != 'closed' || github.event.pull_request.merged == true) &&
needs.is_website.result == 'success'
permissions: {}
permissions:
issues: read # List issue comments
pull-requests: write # Comment on PRs

steps:
- <<: *getGitHubAppToken
Expand All @@ -3366,8 +3368,7 @@ jobs:
permissions: >-
{
"metadata": "read",
"contents": "read",
"pull_requests": "write"
"contents": "read"
}
- *checkoutVersionedSha
- *createLocalRefs
Expand Down Expand Up @@ -3420,6 +3421,7 @@ jobs:
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Website deployed to CF Pages, 👀 preview link
token: ${{ secrets.GITHUB_TOKEN }}

- name: Create or update Cloudflare Pages link comment if deployment link present
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
Expand All @@ -3428,7 +3430,7 @@ jobs:
comment-id: ${{ steps.find_cf_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
token: ${{ steps.gh_app_token.outputs.token || secrets.FLOWZONE_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
Website deployed to CF Pages, 👀 preview link ${{ steps.deploy_cf_pages.outputs.deployment-url }}
Expand Down

0 comments on commit b1d51a5

Please sign in to comment.