Skip to content

Commit 3058bc5

Browse files
authored
fix: sanitize environment variables for PR SHA and number (#206)
1 parent caaf08f commit 3058bc5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/externalPR.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
- run: unzip pr.zip
3939
- name: outputs
4040
run: |-
41-
echo "PR=$(cat NR)" >> $GITHUB_ENV
42-
echo "SHA=$(cat SHA)" >> $GITHUB_ENV
41+
echo "PR=$(cat NR | tr -cd '0-9')" >> $GITHUB_ENV
42+
echo "SHA=$(cat SHA | tr -cd 'a-fA-F0-9')" >> $GITHUB_ENV
4343
- name: cobertura-report-unit-test
4444
uses: 5monkeys/cobertura-action@v14
4545
continue-on-error: true

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Build
2525
run: mvn -U -ntp clean verify
2626
- name: Upload Coverage
27-
uses: actions/upload-artifact@v3
27+
uses: actions/upload-artifact@v4
2828
with:
2929
name: Coverage Report
3030
path: target/jacoco-report
@@ -39,7 +39,7 @@ jobs:
3939
cp target/jacoco-report/cobertura.xml ./pr/jacoco-report/cobertura.xml
4040
if: github.event_name == 'pull_request'
4141
- name: Upload files
42-
uses: actions/upload-artifact@v3
42+
uses: actions/upload-artifact@v4
4343
with:
4444
name: pr
4545
path: pr/

0 commit comments

Comments
 (0)