Tweak Github Actions (#366) #395
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gold Data | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
paths: | |
- "**/gold_data/**" | |
jobs: | |
run: | |
name: Run | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/commit-baseline | |
id: baseline | |
- uses: actions/checkout@v4 | |
with: | |
path: tmp/baseline | |
ref: ${{ steps.baseline.outputs.sha }} | |
- name: Generate Gold Data Report | |
env: | |
REPORT_GIT_REF_BEFORE: ${{ steps.baseline.outputs.ref }} | |
REPORT_GIT_REF_AFTER: ${{ github.ref }} | |
run: | | |
mkdir -p tmp/report | |
scripts/common-gold-data/report.sh . tmp/baseline > tmp/report/report.md | |
cat tmp/report/report.md >> "$GITHUB_STEP_SUMMARY" | |
- name: Save Pull Request Number | |
if: github.event_name == 'pull_request' | |
env: | |
NUMBER: ${{ github.event.number }} | |
run: | | |
echo "$NUMBER" > tmp/report/pull-request.txt | |
- name: Upload Report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gold-data-report | |
path: tmp/report | |
retention-days: 1 |