File tree Expand file tree Collapse file tree 7 files changed +93
-15
lines changed
Expand file tree Collapse file tree 7 files changed +93
-15
lines changed Original file line number Diff line number Diff line change 99 - ' edited'
1010 - ' synchronize'
1111
12+ permissions : {}
13+
1214concurrency :
1315 group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
1416 cancel-in-progress : true
1517
1618jobs :
1719 conventional-commit-check :
20+ name : Check conventional commit
1821 runs-on : ubuntu-latest
1922 timeout-minutes : 15
2023 permissions :
21- contents : read
2224 pull-requests : read
2325
2426 steps :
Original file line number Diff line number Diff line change 88 branches :
99 - ' main'
1010
11+ permissions : {}
12+
1113concurrency :
1214 group : ${{ github.workflow }}-${{ github.ref }}
1315 cancel-in-progress : true
1416
1517jobs :
1618 scan-secrets :
19+ name : Scan for secrets
1720 runs-on : ubuntu-latest
1821 timeout-minutes : 15
1922 permissions :
Original file line number Diff line number Diff line change 1010 branches :
1111 - ' main'
1212
13+ permissions : {}
14+
1315concurrency :
1416 group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
1517 cancel-in-progress : true
1618
1719jobs :
1820 check-conflicts :
21+ name : Check for conflict markers
1922 runs-on : ubuntu-latest
2023 timeout-minutes : 15
2124 permissions :
@@ -76,15 +79,16 @@ jobs:
7679 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7780 PR_NUMBER : ${{ github.event.pull_request.number }}
7881 HAS_CONFLICTS : ${{ steps.conflict-check.outputs.has_conflicts }}
82+ REPO : ${{ github.repository }}
7983 run : |
8084 LABEL_NAME="has-conflicts"
8185
8286 if [ "$HAS_CONFLICTS" = "true" ]; then
8387 echo "Adding conflict label to PR #${PR_NUMBER}..."
84- gh pr edit "$PR_NUMBER" --add-label "$LABEL_NAME" --repo ${{ github.repository }} || true
88+ gh pr edit "$PR_NUMBER" --add-label "$LABEL_NAME" --repo "$REPO" || true
8589 else
8690 echo "Removing conflict label from PR #${PR_NUMBER}..."
87- gh pr edit "$PR_NUMBER" --remove-label "$LABEL_NAME" --repo ${{ github.repository }} || true
91+ gh pr edit "$PR_NUMBER" --remove-label "$LABEL_NAME" --repo "$REPO" || true
8892 fi
8993
9094 - name : Find existing comment
9599 comment-author : ' github-actions[bot]'
96100 body-includes : ' <!-- conflict-checker-comment -->'
97101
98- - name : Create or update comment
102+
103+ - name : Create or update comment # zizmor: ignore[superfluous-actions]
99104 uses : peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
100105 with :
101106 comment-id : ${{ steps.find-comment.outputs.comment-id }}
Original file line number Diff line number Diff line change 88 branches :
99 - " main"
1010
11+ permissions : {}
12+
13+ concurrency :
14+ group : ${{ github.workflow }}-${{ github.ref }}
15+ cancel-in-progress : true
16+
1117jobs :
1218 build :
19+ name : Lint and test (Python ${{ matrix.python-version }})
1320 runs-on : ubuntu-latest
1421 strategy :
1522 matrix :
6875 - name : Upload coverage reports to Codecov
6976 uses : codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
7077 with :
71- token : ${{ secrets.CODECOV_TOKEN }}
78+ token : ${{ secrets.CODECOV_TOKEN }} # zizmor: ignore[secrets-outside-env]
7279 slug : prowler-cloud/py-pwsh-session
Original file line number Diff line number Diff line change 11name : PyPI release
2- permissions :
3- contents : read
4- id-token : write
52
63on :
74 release :
85 types : [published]
96
7+ permissions : {}
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : false
12+
1013env :
11- RELEASE_TAG : ${{ github.event.release.tag_name }}
1214 PYTHON_VERSION : 3.11
13- # CACHE: "poetry"
1415
1516jobs :
1617 release :
1718 runs-on : ubuntu-latest
19+ environment : release
20+ permissions :
21+ contents : read
22+ id-token : write
1823
1924 name : Release py-pwsh-session to PyPI
2025 steps :
21- - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
26+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2227 with :
2328 persist-credentials : false
2429
@@ -27,15 +32,13 @@ jobs:
2732 pipx install poetry==2.1.1
2833
2934 - name : Setup Python
30- uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1 .0
35+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2 .0
3136 with :
3237 python-version : ${{ env.PYTHON_VERSION }}
33- # cache: ${{ env.CACHE }}
3438
3539 - name : Build package
3640 run : |
3741 poetry build
3842
3943 - name : Publish package to PyPI
40- run : |
41- POETRY_PYPI_TOKEN_PYPI=${{ secrets.PYPI_API_TOKEN }} poetry publish
44+ uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
Original file line number Diff line number Diff line change 1+ name : " Tools: Zizmor"
2+
3+ on :
4+ push :
5+ branches :
6+ - " main"
7+ paths :
8+ - " .github/workflows/**"
9+ pull_request :
10+ branches :
11+ - " main"
12+ paths :
13+ - " .github/workflows/**"
14+
15+ permissions : {}
16+
17+ jobs :
18+ zizmor-pr :
19+ name : Run zizmor (PR)
20+ if : github.event_name == 'pull_request'
21+ runs-on : ubuntu-latest
22+ permissions :
23+ contents : read
24+ actions : read
25+ steps :
26+ - name : Checkout repository
27+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+ with :
29+ persist-credentials : false
30+
31+ - name : Run zizmor
32+ uses : zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
33+ with :
34+ advanced-security : " false"
35+ annotations : " true"
36+
37+ zizmor-push :
38+ name : Run zizmor (push)
39+ if : github.event_name == 'push'
40+ runs-on : ubuntu-latest
41+ permissions :
42+ security-events : write
43+ contents : read
44+ actions : read
45+ steps :
46+ - name : Checkout repository
47+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48+ with :
49+ persist-credentials : false
50+
51+ - name : Run zizmor
52+ uses : zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ repos:
2121 args : ["--autofix"]
2222 files : pyproject.toml
2323
24+ # # GITHUB ACTIONS
25+ - repo : https://github.com/zizmorcore/zizmor-pre-commit
26+ rev : v1.23.1
27+ hooks :
28+ - id : zizmor
29+
2430 # # PYTHON
2531 - repo : https://github.com/myint/autoflake
2632 rev : v2.3.1
You can’t perform that action at this time.
0 commit comments