ci: use GitHub App token to bypass branch protection
This commit is contained in:
13
.github/workflows/auto-update-app-headers.yml
generated
vendored
13
.github/workflows/auto-update-app-headers.yml
generated
vendored
@@ -19,11 +19,20 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate app token
|
||||||
|
id: generate-token
|
||||||
|
uses: actions/create-github-app-token@v2
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.APP_ID }}
|
||||||
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||||
|
owner: community-scripts
|
||||||
|
repositories: ProxmoxVED
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|
||||||
- name: Set up Git
|
- name: Set up Git
|
||||||
run: |
|
run: |
|
||||||
@@ -51,6 +60,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Commit and push changes
|
- name: Commit and push changes
|
||||||
if: steps.check_changes.outputs.changed == 'true'
|
if: steps.check_changes.outputs.changed == 'true'
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
run: |
|
run: |
|
||||||
git commit -m "chore: update app headers [skip ci]"
|
git commit -m "chore: update app headers [skip ci]"
|
||||||
git pull --rebase origin main
|
git pull --rebase origin main
|
||||||
|
|||||||
Reference in New Issue
Block a user