Skip to content

Commit 9da26a0

Browse files
committed
ci: inherit secrets in CI and release workflows
- Added `secrets: inherit` to the CI job in `ci.yml` to ensure secrets are available during the CI process. - Added `secrets: inherit` to the verify_release job in `release.yml` for consistent access to secrets. - Updated the condition for publishing coverage in `shared-ci.yml` to check if the coverage token is not empty, enhancing security.
1 parent 502701c commit 9da26a0

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ jobs:
1717
permissions:
1818
contents: read
1919
uses: ./.github/workflows/shared-ci.yml
20+
secrets: inherit
2021
with:
2122
upload_coverage: true

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
permissions:
2323
contents: read
2424
uses: ./.github/workflows/shared-ci.yml
25+
secrets: inherit
2526
with:
2627
upload_coverage: false
2728

.github/workflows/shared-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
working-directory: ${{ env.APP_DIR }}
137137
run: bin/rspec --format documentation --color --profile
138138
- name: Publish coverage to Qlty
139-
if: inputs.upload_coverage && matrix.ruby_version == '3.4'
139+
if: inputs.upload_coverage && matrix.ruby_version == '3.4' && secrets.QLTY_COVERAGE_TOKEN != ''
140140
uses: qltysh/qlty-action/coverage@v2
141141
with:
142142
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}

0 commit comments

Comments
 (0)