Skip to content

Commit ecd0bb9

Browse files
authored
chore(ci): use dedicated dependabot org-secret to check out XML submodule (#140)
1 parent 5872427 commit ecd0bb9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/coverage.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ jobs:
1515
- uses: actions/checkout@v4
1616
with:
1717
ref: ${{ github.event.workflow_run.head_branch }}
18-
token: ${{ secrets.XML_SUBMODULE_PAT }} # token with repo scope; expires never
18+
token: ${{ github.actor == 'dependabot[bot]' && secrets.REPO_AND_READ_PACKAGES_PAT || secrets.XML_SUBMODULE_PAT }}
19+
# XML_SUBMODULE_PAT is a secret token on repository level with repo scope; expires in Jan2026
1920
# https://github.com/Hochfrequenz/xml-fundamend-python/settings/secrets/actions/XML_AHB_MIG_Token
21+
# REPO_AND_READ_PACKAGES_PAT is a secret token on organization level
22+
# https://github.com/organizations/Hochfrequenz/settings/secrets/dependabot/REPO_AND_READ_PACKAGES_PAT
2023
submodules: "recursive"
2124
- name: Set up Python ${{ matrix.python-version }}
2225
uses: actions/setup-python@v5

.github/workflows/unittests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
ref: ${{ github.event.workflow_run.head_branch }}
19-
token: ${{ secrets.XML_SUBMODULE_PAT }} # token with repo scope; expires in Jan2026
19+
token: ${{ github.actor == 'dependabot[bot]' && secrets.REPO_AND_READ_PACKAGES_PAT || secrets.XML_SUBMODULE_PAT }}
20+
# XML_SUBMODULE_PAT is a secret token on repository level with repo scope; expires in Jan2026
2021
# https://github.com/Hochfrequenz/xml-fundamend-python/settings/secrets/actions/XML_AHB_MIG_Token
22+
# REPO_AND_READ_PACKAGES_PAT is a secret token on organization level
23+
# https://github.com/organizations/Hochfrequenz/settings/secrets/dependabot/REPO_AND_READ_PACKAGES_PAT
2124
submodules: "recursive"
2225
- name: Set up Python ${{ matrix.python-version }}
2326
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)