Skip to content

Commit

Permalink
ci: change references from personal access token to github one (#674)
Browse files Browse the repository at this point in the history
In this way github-actions bot signs Pull Requests and make it clear they came from automated actions

(cherry picked from commit 8aca83b)
  • Loading branch information
fschuch authored and github-actions[bot] committed Dec 18, 2024
1 parent 6edac41 commit 907b2dd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/backport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- closed
- labeled

permissions:
contents: write
pull-requests: write

jobs:
backport:
name: Backport
Expand All @@ -30,6 +34,6 @@ jobs:
- name: Generate backport
uses: tibdex/backport@v2
with:
github_token: ${{ secrets.TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
title_template: "[<%= base %>] <%= title %>"
label_pattern: "^backport/(?<base>([^ ]+))$"
6 changes: 5 additions & 1 deletion .github/workflows/prepare_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ on:
- premajor
- prerelease

permissions:
contents: write
pull-requests: write

jobs:
bump-version:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -86,7 +90,7 @@ jobs:
name: Create Pull Request
id: cpr
with:
token: ${{ secrets.TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Prepared release ${{ steps.api-package.outputs.version }}"
branch: "prepare-release/${{ steps.api-package.outputs.version }}"
title: "Release ${{ steps.api-package.outputs.version }}"
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tag_on_merged_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ on:
- release/**
types: [closed]

permissions:
contents: write

jobs:
create-tag:
if: (github.event.pull_request.merged && startsWith(github.head_ref, 'prepare-release/'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: bluwy/substitute-string-action@v1
name: Get Tag
Expand Down

0 comments on commit 907b2dd

Please sign in to comment.