Skip to content

Commit 9bacb77

Browse files
committed
Do not pass secrets to environment variables
Why was it done in the first place? Today GitHub Actions is skipping Codacy and Stryker steps. I'm sure it used to work. Let's try to test if the secrets exist directly on secrets.* instead of env.*
1 parent 5974294 commit 9bacb77

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
version: ${{ steps.dotnet-pack.outputs.version }}
2727
nupkg-filename: ${{ steps.dotnet-pack.outputs.nupkg-filename }}
2828
release-body: ${{ steps.tag-message.outputs.release-notes }}
29-
env:
30-
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
31-
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
3229
steps:
3330
- name: Checkout git repository
3431
uses: actions/checkout@v3
@@ -75,7 +72,7 @@ jobs:
7572
with:
7673
files: ${{ steps.dotnet-test.outputs.coverage-reports }}
7774
- name: Upload coverage report to Codacy
78-
if: matrix.os == 'ubuntu-latest' && env.CODACY_PROJECT_TOKEN != ''
75+
if: matrix.os == 'ubuntu-latest' && secrets.CODACY_PROJECT_TOKEN != ''
7976
uses: codacy/codacy-coverage-reporter-action@v1
8077
with:
8178
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
@@ -90,7 +87,7 @@ jobs:
9087
name: ${{ steps.dotnet-pack.outputs.nupkg-filename }}
9188
path: ${{ steps.dotnet-pack.outputs.nupkg-filename }}
9289
- name: Run mutation tests and upload report to Stryker dashboard
93-
if: matrix.os == 'ubuntu-latest' && env.STRYKER_DASHBOARD_API_KEY != ''
90+
if: matrix.os == 'ubuntu-latest' && secrets.STRYKER_DASHBOARD_API_KEY != ''
9491
run: |
9592
dotnet tool restore
9693
dotnet tool run dotnet-stryker --reporter dashboard --version ${GITHUB_REF_NAME} --dashboard-api-key ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

0 commit comments

Comments
 (0)