Implement job priorities in daily report #18
Workflow file for this run
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: Buildfarmer Log Daily Report Generation CI | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'database/scripts/lib/*' | |
- 'database/scripts/generate_report.rb' | |
- 'database/scripts/format_report.rb' | |
- 'database/buildfarmer.db' | |
- '.github/workflows/daily-workflow-ci.yml' | |
workflow_dispatch: | |
jobs: | |
run-ci: | |
name: Setup | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby 3.2 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
- name: Set report name | |
run: | | |
BRANCH=${{ github.head_ref }} | |
REPORT_NAME="${BRANCH/\//_}" | |
echo "REPORT_NAME is: $REPORT_NAME" | |
echo "REPORT_NAME=$REPORT_NAME" >> $GITHUB_ENV | |
- name: Generate today's report | |
run: | | |
cd database/scripts | |
./generate_report.rb -o ci_report.json | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ env.REPORT_NAME }}-report" | |
path: database/scripts/ci_report.json | |
retention-days: 5 # Don't keep the artifact for much longer | |
overwrite: true # Use the same artifact name each time to save space | |
- name: Save report into markdown format | |
run: | | |
cd database/scripts | |
echo "# $(date '+%b %d')" > formatted_report.md | |
./format_report.rb ci_report.json >> formatted_report.md | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: database/scripts/formatted_report.md | |
name: "${{ env.REPORT_NAME }}-formatted-report" | |
retention-days: 5 | |
overwrite: true |