From 1776f7665237e07893a942524c563d52a2a51e8e Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Wed, 9 Oct 2024 10:39:31 -0500 Subject: [PATCH 01/10] Fix report branch name 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 4585fbf..9dabc60 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -9,6 +9,7 @@ on: - 'database/scripts/generate_report.rb' - 'database/scripts/format_report.rb' - 'database/buildfarmer.db' + workflow_dispatch: jobs: run-ci: name: Setup @@ -19,13 +20,18 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.2' + - name: Set report name + env: + name: "${{ env.BRANCH_NAME }}" + run: | + echo "REPORT_NAME=${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: "$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 @@ -37,6 +43,6 @@ jobs: - uses: actions/upload-artifact@v4 with: path: database/scripts/formatted_report.md - name: "${{ github.ref_name }}-formatted-report" + name: "$REPORT_NAME-formatted-report" retention-days: 5 overwrite: true From 829e5fde671780d46b824188e3dadf991535c640 Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Thu, 10 Oct 2024 14:04:00 -0500 Subject: [PATCH 02/10] Fix report name reading Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index 9dabc60..8109a6e 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -31,7 +31,7 @@ jobs: ./generate_report.rb -o ci_report.json - uses: actions/upload-artifact@v4 with: - name: "$REPORT_NAME-report" + name: "${{ 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 @@ -43,6 +43,6 @@ jobs: - uses: actions/upload-artifact@v4 with: path: database/scripts/formatted_report.md - name: "$REPORT_NAME-formatted-report" + name: "${{ REPORT_NAME }}-formatted-report" retention-days: 5 overwrite: true From d9803d8208f7d053911fbfe9e043b85b2f04baba Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Thu, 10 Oct 2024 14:06:02 -0500 Subject: [PATCH 03/10] Add env to report variable Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index 8109a6e..8212f46 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -31,7 +31,7 @@ jobs: ./generate_report.rb -o ci_report.json - uses: actions/upload-artifact@v4 with: - name: "${{ REPORT_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 @@ -43,6 +43,6 @@ jobs: - uses: actions/upload-artifact@v4 with: path: database/scripts/formatted_report.md - name: "${{ REPORT_NAME }}-formatted-report" + name: "${{ env.REPORT_NAME }}-formatted-report" retention-days: 5 overwrite: true From bfe3ec010c051c383a212b75ae0b31de00a9bec3 Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Thu, 10 Oct 2024 14:31:12 -0500 Subject: [PATCH 04/10] Show report name Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index 8212f46..f08d688 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -21,10 +21,11 @@ jobs: with: ruby-version: '3.2' - name: Set report name - env: - name: "${{ env.BRANCH_NAME }}" run: | - echo "REPORT_NAME=${name/\//_}" >> $GITHUB_ENV + 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 From 98d0afa8b8963ef412eb6cb233d29643e36a4616 Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Thu, 10 Oct 2024 14:34:01 -0500 Subject: [PATCH 05/10] Run job if pull request to workflow file Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index f08d688..c865b51 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -9,6 +9,7 @@ on: - 'database/scripts/generate_report.rb' - 'database/scripts/format_report.rb' - 'database/buildfarmer.db' + - '.github/workflows/daily-workflow-ci.yaml' workflow_dispatch: jobs: run-ci: From d89ddb714815b4cfbd5591efd9c7ac5d2506c4e0 Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Fri, 18 Oct 2024 11:52:05 -0500 Subject: [PATCH 06/10] Apply PR comments Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index 7b6823e..da88175 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -23,8 +23,7 @@ jobs: ruby-version: '3.2' - name: Set report name run: | - BRANCH=${{ github.head_ref }} - REPORT_NAME="${BRANCH/\//_}" + REPORT_NAME="${github.head_ref //\//_}" echo "REPORT_NAME is: $REPORT_NAME" echo "REPORT_NAME=$REPORT_NAME" >> $GITHUB_ENV - name: Generate today's report From bd1f8bc67baea41f71597689d726dac28f7b9574 Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Fri, 18 Oct 2024 11:54:05 -0500 Subject: [PATCH 07/10] Use double brackets Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index da88175..8d54ba5 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -23,7 +23,7 @@ jobs: ruby-version: '3.2' - name: Set report name run: | - REPORT_NAME="${github.head_ref //\//_}" + REPORT_NAME="${{ github.head_ref //\//_}}" echo "REPORT_NAME is: $REPORT_NAME" echo "REPORT_NAME=$REPORT_NAME" >> $GITHUB_ENV - name: Generate today's report From 811171f9c7b0434f302dca39416b74f5349e1cac Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Fri, 18 Oct 2024 11:55:06 -0500 Subject: [PATCH 08/10] Remove double brackets and test with one slash Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index 8d54ba5..56873ab 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -23,7 +23,7 @@ jobs: ruby-version: '3.2' - name: Set report name run: | - REPORT_NAME="${{ github.head_ref //\//_}}" + REPORT_NAME="${ github.head_ref /\//_}" echo "REPORT_NAME is: $REPORT_NAME" echo "REPORT_NAME=$REPORT_NAME" >> $GITHUB_ENV - name: Generate today's report From 92e1d15cd67c49a1c899affe831833dab67fc062 Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Fri, 18 Oct 2024 11:56:54 -0500 Subject: [PATCH 09/10] Remove quotes Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index 56873ab..f898759 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -23,7 +23,7 @@ jobs: ruby-version: '3.2' - name: Set report name run: | - REPORT_NAME="${ github.head_ref /\//_}" + REPORT_NAME=${{ github.head_ref /\//_}} echo "REPORT_NAME is: $REPORT_NAME" echo "REPORT_NAME=$REPORT_NAME" >> $GITHUB_ENV - name: Generate today's report From 02582ad912a490e52a08d3ec22a82a3a345b6fa4 Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Fri, 18 Oct 2024 11:58:48 -0500 Subject: [PATCH 10/10] Revert everything to last working commit Signed-off-by: Crola1702 --- .github/workflows/daily-workflow-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/daily-workflow-ci.yml b/.github/workflows/daily-workflow-ci.yml index f898759..7b6823e 100644 --- a/.github/workflows/daily-workflow-ci.yml +++ b/.github/workflows/daily-workflow-ci.yml @@ -23,7 +23,8 @@ jobs: ruby-version: '3.2' - name: Set report name run: | - REPORT_NAME=${{ github.head_ref /\//_}} + 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