Skip to content

Commit

Permalink
Use PAT instead of default token to trigger automatic PRs. (#2063)
Browse files Browse the repository at this point in the history
Fixes #1996 again. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

> When you use the repository's GITHUB_TOKEN to perform tasks, events
triggered by the GITHUB_TOKEN will not create a new workflow run. This
prevents you from accidentally creating recursive workflow runs. For
example, if a workflow run pushes code using the repository's
GITHUB_TOKEN, a new workflow will not run even when the repository
contains a workflow configured to run when push events occur.

This PAT is valid for 1 year (!)

---------

Co-authored-by: Martijn Visser <mgvisser@gmail.com>
  • Loading branch information
evetion and visr authored Feb 13, 2025
1 parent eb81f0e commit 34e1c82
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/core_testmodels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Julia Run Testmodels
on:
push:
branches: [main, "update/pixi-lock", "update/julia-manifest"]
branches: [main, update/pixi-lock, update/julia-manifest]
paths-ignore: [".teamcity/**"]
tags: ["*"]
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Julia Tests
on:
push:
branches: [main, "update/pixi-lock", "update/julia-manifest"]
branches: [main, update/pixi-lock, update/julia-manifest]
paths-ignore: [".teamcity/**"]
tags: ["*"]
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Docs
on:
push:
branches: [main, "update/pixi-lock", "update/julia-manifest"]
branches: [main, update/pixi-lock, update/julia-manifest]
paths-ignore: [".teamcity/**"]
pull_request:
paths-ignore: [".teamcity/**"]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/julia_auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
pixi run update-manifest-julia
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "update/julia-manifest"
token: ${{ secrets.CI_PR_PAT }}
branch: update/julia-manifest
title: Update Julia manifest
commit-message: "Update Julia manifest"
body: Update Julia dependencies to the latest version.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Mypy Type Check
on:
push:
branches: [main, "update/pixi-lock"]
branches: [main, update/pixi-lock]
paths-ignore: [".teamcity/**"]
tags: ["*"]
pull_request:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pixi_auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.CI_PR_PAT }}
commit-message: Update pixi lockfile
title: Update pixi lockfile
body-path: diff.md
branch: "update/pixi-lock"
branch: update/pixi-lock
base: main
delete-branch: true
add-paths: pixi.lock
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit_auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- uses: browniebroke/pre-commit-autoupdate-action@main
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "update/pre-commit-hooks"
token: ${{ secrets.CI_PR_PAT }}
branch: update/pre-commit-hooks
title: Update pre-commit hooks
commit-message: "Update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
merge_group:
push:
branches: [main, "update/pre-commit-hooks", "update/pixi-lock"]
branches: [main, update/pre-commit-hooks, update/pixi-lock]
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_codegen.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Python Codegen
on:
push:
branches: [main, "update/pixi-lock"]
branches: [main, update/pixi-lock]
paths-ignore: [".teamcity/**"]
tags: ["*"]
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Ribasim Python Tests
on:
push:
branches: [main, "update/pixi-lock"]
branches: [main, update/pixi-lock]
paths-ignore: [".teamcity/**"]
tags: ["*"]
pull_request:
Expand Down

0 comments on commit 34e1c82

Please sign in to comment.