From 0f84a43cbee287e62b4a73bfd2d1a08a61152da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Crist=C3=B3bal=20Arroyo?= Date: Fri, 18 Oct 2024 12:03:20 -0500 Subject: [PATCH] Fix report branch name (#102) * Fix report branch name Signed-off-by: Crola1702 * Fix report name reading Signed-off-by: Crola1702 * Add env to report variable Signed-off-by: Crola1702 * Show report name Signed-off-by: Crola1702 * Run job if pull request to workflow file Signed-off-by: Crola1702 * Apply PR comments Signed-off-by: Crola1702 * Use double brackets Signed-off-by: Crola1702 * Remove double brackets and test with one slash Signed-off-by: Crola1702 * Remove quotes Signed-off-by: Crola1702 * Revert everything to last working commit Signed-off-by: Crola1702 --------- Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index b7cbf94..7b6823e 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -21,13 +21,19 @@ jobs: 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: "${{ github.ref_name }}-report" + 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 @@ -39,6 +45,6 @@ jobs: - uses: actions/upload-artifact@v4 with: path: database/scripts/formatted_report.md - name: "${{ github.ref_name }}-formatted-report" + name: "${{ env.REPORT_NAME }}-formatted-report" retention-days: 5 overwrite: true