Skip to content

Commit

Permalink
Fail the publish step if the token is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
joemcgill committed Oct 11, 2024
1 parent 7d2fedb commit b58da09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/reusable-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,12 @@ jobs:
COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }}
CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }}
HOST_NAME: "www.codevitals.run"
run: node ./tests/performance/log-results.js $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT $HOST_NAME
run: |
if [ -z "$CODEVITALS_PROJECT_TOKEN" ]; then
echo "Performance results could not be published. 'CODEVITALS_PROJECT_TOKEN' is not set" >> $GITHUB_OUTPUT
exit 1
fi
node ./tests/performance/log-results.js $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT $HOST_NAME
- name: Ensure version-controlled files are not modified or deleted
run: git diff --exit-code

0 comments on commit b58da09

Please sign in to comment.