Skip to content

Commit b35493b

Browse files
committed
CI: Subs Workflow can read PAT
1 parent 4ea67ac commit b35493b

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.github/workflows/ci.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ jobs:
1111
# Pushes should only run on mainline branch "development"
1212
if: github.event_name == 'push' && github.repository == 'AMReX-Codes/pyamrex' && github.ref == 'refs/heads/development'
1313
name: 🔄 Update Stub Files
14-
permissions:
15-
# Give the default GITHUB_TOKEN write permission to commit and push the
16-
# changed files back to the repository.
17-
contents: write
14+
secrets:
15+
PYAMREX_PUSH_TOKEN: ${{ secrets.PYAMREX_PUSH_TOKEN }}
1816
uses: ./.github/workflows/stubs.yml
1917

2018
ubuntu:

.github/workflows/stubs.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: 🔄 Update Stub Files
22

33
# This workflow updates the .pyi stub files for documentation and interactive use.
44

5-
on: [workflow_call]
5+
on:
6+
workflow_call:
7+
secrets:
8+
PYAMREX_PUSH_TOKEN:
9+
required: true
610

711
concurrency:
812
group: ${{ github.ref }}-${{ github.head_ref }}-stubs
@@ -19,13 +23,8 @@ jobs:
1923
CXXFLAGS: "-O1"
2024
OMP_NUM_THREAD: 2
2125

22-
permissions:
23-
# Give the default GITHUB_TOKEN write permission to commit and push the
24-
# changed files back to the repository.
25-
contents: write
26-
2726
steps:
28-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2928
with:
3029
token: ${{ secrets.PYAMREX_PUSH_TOKEN }}
3130

@@ -83,7 +82,7 @@ jobs:
8382
run: |
8483
mpiexec -np 1 python3 -m pytest tests/
8584
86-
- uses: stefanzweifel/git-auto-commit-action@v4
85+
- uses: stefanzweifel/git-auto-commit-action@v5
8786
name: Commit Updated Stub Files
8887
with:
8988
commit_message: Update Stub Files

0 commit comments

Comments
 (0)