Skip to content

Commit 09ed832

Browse files
Replace secret checking logic with branch detection logic (#726)
1 parent c5a65a8 commit 09ed832

File tree

2 files changed

+2
-40
lines changed

2 files changed

+2
-40
lines changed

.github/workflows/integration-test.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,11 @@ on:
1818
- "./docker-compose.yml" # any change to Docker configuration
1919

2020
jobs:
21-
check-test-secrets:
22-
name: Check for test secrets
23-
runs-on: ubuntu-22.04
24-
outputs:
25-
available: ${{ steps.check-test-secrets.outputs.available }}
26-
permissions:
27-
contents: read
28-
29-
steps:
30-
- name: Check
31-
id: check-test-secrets
32-
run: |
33-
if [ "${{ secrets.CODECOV_TOKEN }}" != '' ]; then
34-
echo "available=true" >> $GITHUB_OUTPUT;
35-
else
36-
echo "available=false" >> $GITHUB_OUTPUT;
37-
fi
3821

3922
testing:
4023
name: Run tests
4124
if: ${{ startsWith(github.head_ref, 'version_bump_') == false }}
4225
runs-on: ubuntu-22.04
43-
needs: check-test-secrets
4426
permissions:
4527
checks: write
4628
contents: read
@@ -80,7 +62,7 @@ jobs:
8062

8163
- name: Report test results
8264
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1
83-
if: ${{ needs.check-test-secrets.outputs.available == 'true' && !cancelled() }}
65+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && !cancelled() }}
8466
with:
8567
name: Test Results
8668
path: "junit.xml"
@@ -92,6 +74,5 @@ jobs:
9274

9375
- name: Upload results to codecov.io
9476
uses: codecov/test-results-action@4e79e65778be1cecd5df25e14af1eafb6df80ea9 # v1.0.2
95-
if: ${{ needs.check-test-secrets.outputs.available == 'true' }}
9677
env:
9778
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/test.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,11 @@ on:
1010
pull_request:
1111

1212
jobs:
13-
check-test-secrets:
14-
name: Check for test secrets
15-
runs-on: ubuntu-24.04
16-
outputs:
17-
available: ${{ steps.check-test-secrets.outputs.available }}
18-
permissions:
19-
contents: read
20-
21-
steps:
22-
- name: Check
23-
id: check-test-secrets
24-
run: |
25-
if [ "${{ secrets.CODECOV_TOKEN }}" != '' ]; then
26-
echo "available=true" >> $GITHUB_OUTPUT;
27-
else
28-
echo "available=false" >> $GITHUB_OUTPUT;
29-
fi
3013

3114
testing:
3215
name: Run tests
3316
if: ${{ startsWith(github.head_ref, 'version_bump_') == false }}
3417
runs-on: ubuntu-24.04
35-
needs: check-test-secrets
3618
permissions:
3719
checks: write
3820
contents: read
@@ -70,7 +52,7 @@ jobs:
7052

7153
- name: Report test results
7254
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1
73-
if: ${{ needs.check-test-secrets.outputs.available == 'true' && !cancelled() }}
55+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && !cancelled() }}
7456
with:
7557
name: Test Results
7658
path: "junit.xml"
@@ -82,6 +64,5 @@ jobs:
8264

8365
- name: Upload results to codecov.io
8466
uses: codecov/test-results-action@4e79e65778be1cecd5df25e14af1eafb6df80ea9 # v1.0.2
85-
if: ${{ needs.check-test-secrets.outputs.available == 'true' }}
8667
env:
8768
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)