-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: apply tokens to close pr job as well
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,7 @@ jobs: | |
###### End of Repository/Build Configurations ###### | ||
|
||
- name: Clear Cloudflare cache | ||
if: github.event_name == 'push' | ||
uses: Cyb3r-Jak3/[email protected] | ||
with: | ||
zone: ${{ secrets.CLOUDFLARE_ZONE }} | ||
|
@@ -62,9 +63,29 @@ jobs: | |
if: github.event_name == 'pull_request' && github.event.action == 'closed' | ||
runs-on: ubuntu-latest | ||
name: Close Pull Request Job | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
- run: pnpm install --frozen-lockfile | ||
- name: Get Id Token | ||
uses: actions/github-script@v6 | ||
id: idtoken | ||
with: | ||
script: | | ||
const coredemo = require('@actions/core') | ||
return await coredemo.getIDToken() | ||
result-encoding: string | ||
- name: Close Pull Request | ||
id: closepullrequest | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_DELIGHTFUL_CLIFF_0ACDAF71E }} | ||
github_id_token: ${{ steps.idtoken.outputs.result }} | ||
action: "close" |