Skip to content

Commit

Permalink
ci(lang-parser): Use app token instead of GITHUB_TOKEN
Browse files Browse the repository at this point in the history
This is needed as creating a pr/pushing a commit using the GITHUB_TOKEN
will not trigger other workflow runs. Which is done to prevent circular
workflow runs.

Using a token generated from a github app does not have this limitation.
  • Loading branch information
Histalek committed Feb 3, 2024
1 parent db0b24f commit fd237b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/lang-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ jobs:
- name: run language parser
run: python ttt2-language_parser/parse.py --in "$GITHUB_WORKSPACE/ttt2/lua/terrortown/lang" --out "$GITHUB_WORKSPACE/ttt2/lua/terrortown/lang" --base en --ignore chef

- name: generate app token
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create Pull Request
id: ci-update-language-files
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-token.outputs.token }}
path: ttt2
add-paths: "lua/terrortown/lang/*.lua"
commit-message: Update language files
Expand Down

0 comments on commit fd237b5

Please sign in to comment.