Skip to content

Commit 568cbfb

Browse files
Copilot2bndy5
andauthored
fix: split release-drafter into dedicated reusable workflows for drafting and PR labeling (#71)
* fix: split release-drafter into separate reusable workflows for release drafting and PR labeling Co-authored-by: 2bndy5 <14963867+2bndy5@users.noreply.github.com> * fix: add zizmor ignore comments for secrets-outside-env audit rule Co-authored-by: 2bndy5 <14963867+2bndy5@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: 2bndy5 <14963867+2bndy5@users.noreply.github.com>
1 parent c45083e commit 568cbfb

File tree

5 files changed

+23
-8
lines changed

5 files changed

+23
-8
lines changed

.github/workflows/pr-labeler.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: PR Labeler
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
label_pr:
8+
permissions:
9+
# write permission is required for autolabeler
10+
pull-requests: write
11+
contents: read
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Automatically label pull requests based on the release-drafter config
15+
- uses: release-drafter/release-drafter/autolabeler@3a7fb5c85b80b1dda66e1ccb94009adbbd32fce3 # v7.0.0
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/py-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
4141
env:
42-
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
42+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} # zizmor: ignore[secrets-outside-env]
4343
with:
4444
files: ./coverage.xml
4545
fail_ci_if_error: true # optional (default = false)

.github/workflows/py-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ jobs:
4141
if: startsWith(github.repository, 'cpp-linter') && !startsWith(github.ref, 'refs/tags/')
4242
env:
4343
TWINE_USERNAME: __token__
44-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
44+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} # zizmor: ignore[secrets-outside-env]
4545
run: twine upload --repository testpypi dist/*
4646

4747
- name: Publish package (to PyPI)
4848
if: startsWith(github.repository, 'cpp-linter') && startsWith(github.ref, 'refs/tags/')
4949
env:
5050
TWINE_USERNAME: __token__
51-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
51+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # zizmor: ignore[secrets-outside-env]
5252
run: twine upload dist/*

.github/workflows/release-drafter.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ jobs:
1414
permissions:
1515
# write permission is required to create a github release
1616
contents: write
17-
# write permission is required for autolabeler
18-
# otherwise, read permission is required at least
19-
pull-requests: write
17+
pull-requests: read
2018
runs-on: ubuntu-latest
2119
steps:
2220
# Draft your next Release notes as Pull Requests are merged into the default branch
23-
- uses: release-drafter/release-drafter@6db134d15f3909ccc9eefd369f02bd1e9cffdf97 # v6.2.0
21+
- uses: release-drafter/release-drafter@3a7fb5c85b80b1dda66e1ccb94009adbbd32fce3 # v7.0.0
2422
with:
2523
commitish: '${{ inputs.commitish }}'
2624
env:

.github/workflows/snyk-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# In order to use the Snyk Action you will need to have a Snyk API token.
1818
# More details in https://github.com/snyk/actions#getting-your-snyk-token
1919
# or you can sign up for free at https://snyk.io/login
20-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
20+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} # zizmor: ignore[secrets-outside-env]
2121
with:
2222
image: xianpengshen/clang-tools:all
2323
args: --severity-threshold=high --file=Dockerfile.all

0 commit comments

Comments
 (0)