From 15685abe4f0c3ab106b1d58f5ef00309ca3e6b79 Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Thu, 24 Feb 2022 23:22:11 +0000 Subject: [PATCH 1/9] Update ci.yaml --- .github/workflows/ci.yaml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5d531fadc..f9261945f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -157,19 +157,30 @@ jobs: runs-on: ubuntu-latest needs: pytest steps: - - name: Set custom variables + - name: some check run: | - echo "timestamp=$(date +%Y%m%d-%H%M%S)" >> ${GITHUB_ENV} - export my_branch_tmp=${{github.event.inputs.ref}} - echo "mybranch=${my_branch_tmp:-${GITHUB_REF##*/}}" >> ${GITHUB_ENV} - echo "mybranchref=${my_branch_tmp:-${GITHUB_REF}}" >> ${GITHUB_ENV} - cat ${GITHUB_ENV} + echo "GITHUB_REF: ${GITHUB_REF}" + env + + - name: make date tag + id: mkdatetag + run: echo "::set-output name=dtag::$(date +%Y%m%d_%H%M%S)" + + - name: make ref tag case 1 + id: mkreftag1 + if: ${{github.event.inputs.ref}} != '' + run: echo "::set-output name=reftag::${{github.event.inputs.ref}} + + - name: make ref tag case 2 + id: mkreftag2 + if: ${{github.event.inputs.ref}} == '' + run: echo "::set-output name=reftag::${GITHUB_REF##*/} - name: checkout code tree uses: actions/checkout@v2 with: fetch-depth: 0 - ref: ${{env.mybranchref}} + ref: ${{github.event.inputs.ref}} - name: Run the build in a container (SL7/HEPCloud-CI) uses: ./.github/actions/python-command-in-sl7-container @@ -180,6 +191,6 @@ jobs: - name: Archive rpm uses: actions/upload-artifact@v2 with: - name: rpms-DE-${{env.mybranch}}-${{env.timestamp}} + name: rpms-DE-${{steps.mkreftag1.outputs.reftag}}${{steps.mkreftag2.outputs.reftag}}-${{steps.mkdatetag.outputs.dtag}} path: dist/*.rpm if-no-files-found: error From 53f163511e776524e191e97923975b658a9575a5 Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Thu, 24 Feb 2022 23:29:33 +0000 Subject: [PATCH 2/9] Update ci.yaml --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f9261945f..618e2e45b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -169,12 +169,12 @@ jobs: - name: make ref tag case 1 id: mkreftag1 if: ${{github.event.inputs.ref}} != '' - run: echo "::set-output name=reftag::${{github.event.inputs.ref}} + run: echo "::set-output name=reftag::${{github.event.inputs.ref}}" - name: make ref tag case 2 id: mkreftag2 if: ${{github.event.inputs.ref}} == '' - run: echo "::set-output name=reftag::${GITHUB_REF##*/} + run: echo "::set-output name=reftag::${GITHUB_REF##*/}" - name: checkout code tree uses: actions/checkout@v2 From 589dedeb561beeb3864ce572236f6c6e95045d50 Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:39:36 -0500 Subject: [PATCH 3/9] Update ci.yaml --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 618e2e45b..5b3702151 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,6 +10,7 @@ on: - "!gh-pages" # excludes gh-pages branch pull_request: branches: + - "**" # matches every branch - master - 1.7 workflow_dispatch: From 5a2cbd61c852eaf4d57e3d916294c0f7bbeceb46 Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Wed, 6 Apr 2022 14:32:53 -0500 Subject: [PATCH 4/9] Update ci.yaml --- .github/workflows/ci.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5b3702151..db8650d8a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -174,9 +174,21 @@ jobs: - name: make ref tag case 2 id: mkreftag2 - if: ${{github.event.inputs.ref}} == '' + if: ${{github.event.inputs.ref}} == '' && GITHUB_BASE_REF == '' run: echo "::set-output name=reftag::${GITHUB_REF##*/}" + - name: make ref tag case 3 + id: mkreftag3 + if: ${{github.event.inputs.ref}} == '' && GITHUB_BASE_REF != '' + run: echo "::set-output name=reftag::${GITHUB_REF_NAME%%/*}" + + - name: check tags + run: | + echo "mkdatetag: ${{steps.mkdatetag.outputs.dtag}}" + echo "mkreftag1: ${{steps.mkreftag1.outputs.reftag}}" + echo "mkreftag2: ${{steps.mkreftag2.outputs.reftag}}" + echo "mkreftag3: ${{steps.mkreftag3.outputs.reftag}}" + - name: checkout code tree uses: actions/checkout@v2 with: From c6faf3667854a8bfae5b0f40438e2e1be80dd54c Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Wed, 6 Apr 2022 14:52:37 -0500 Subject: [PATCH 5/9] Update ci.yaml --- .github/workflows/ci.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index db8650d8a..e6a1bdb01 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -179,11 +179,14 @@ jobs: - name: make ref tag case 3 id: mkreftag3 - if: ${{github.event.inputs.ref}} == '' && GITHUB_BASE_REF != '' - run: echo "::set-output name=reftag::${GITHUB_REF_NAME%%/*}" + if: ${{github.event.inputs.ref}} == '' + run: echo "::set-output name=reftag::"$(awk -F"/" '{print $3}' <<< ${GITHUB_REF_NAME}) - name: check tags run: | + echo "GITHUB_REF: ${GITHUB_REF}" + echo "GITHUB_BASE_REF: ${GITHUB_BASE_REF}" + echo "GITHUB_REF_NAME: ${GITHUB_REF_NAME}" echo "mkdatetag: ${{steps.mkdatetag.outputs.dtag}}" echo "mkreftag1: ${{steps.mkreftag1.outputs.reftag}}" echo "mkreftag2: ${{steps.mkreftag2.outputs.reftag}}" From 526b589396bbf343fb97abca25b09a48072a4333 Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Wed, 6 Apr 2022 15:03:15 -0500 Subject: [PATCH 6/9] Update ci.yaml --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e6a1bdb01..ca4a4e06a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -180,7 +180,7 @@ jobs: - name: make ref tag case 3 id: mkreftag3 if: ${{github.event.inputs.ref}} == '' - run: echo "::set-output name=reftag::"$(awk -F"/" '{print $3}' <<< ${GITHUB_REF_NAME}) + run: echo "::set-output name=reftag::"$(awk -F"/" '{print $3}' <<< ${GITHUB_REF}) - name: check tags run: | From 7d23aa2359230b1f7a3e88f219a34f6b6823223b Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Wed, 6 Apr 2022 15:24:04 -0500 Subject: [PATCH 7/9] Update ci.yaml --- .github/workflows/ci.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ca4a4e06a..bafa731cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -174,23 +174,16 @@ jobs: - name: make ref tag case 2 id: mkreftag2 - if: ${{github.event.inputs.ref}} == '' && GITHUB_BASE_REF == '' - run: echo "::set-output name=reftag::${GITHUB_REF##*/}" - - - name: make ref tag case 3 - id: mkreftag3 if: ${{github.event.inputs.ref}} == '' - run: echo "::set-output name=reftag::"$(awk -F"/" '{print $3}' <<< ${GITHUB_REF}) + run: echo "::set-output name=reftag::${GITHUB_BASE_REF:+PR}"$(awk -F"/" '{print $3}' <<< ${GITHUB_REF}) - name: check tags run: | echo "GITHUB_REF: ${GITHUB_REF}" echo "GITHUB_BASE_REF: ${GITHUB_BASE_REF}" - echo "GITHUB_REF_NAME: ${GITHUB_REF_NAME}" echo "mkdatetag: ${{steps.mkdatetag.outputs.dtag}}" echo "mkreftag1: ${{steps.mkreftag1.outputs.reftag}}" echo "mkreftag2: ${{steps.mkreftag2.outputs.reftag}}" - echo "mkreftag3: ${{steps.mkreftag3.outputs.reftag}}" - name: checkout code tree uses: actions/checkout@v2 From 703603f6411f09b4089c3f89412e05a2021b1a82 Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Wed, 6 Apr 2022 15:37:42 -0500 Subject: [PATCH 8/9] Update ci.yaml --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bafa731cc..538659b2d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -181,6 +181,7 @@ jobs: run: | echo "GITHUB_REF: ${GITHUB_REF}" echo "GITHUB_BASE_REF: ${GITHUB_BASE_REF}" + echo "github.event.inputs.ref: #${{github.event.inputs.ref}}#{{github.event.inputs.ref}}#" echo "mkdatetag: ${{steps.mkdatetag.outputs.dtag}}" echo "mkreftag1: ${{steps.mkreftag1.outputs.reftag}}" echo "mkreftag2: ${{steps.mkreftag2.outputs.reftag}}" From 807ce3d4d40950517106c22ba71152d5a584cdfe Mon Sep 17 00:00:00 2001 From: Vito Di Benedetto <55766483+vitodb@users.noreply.github.com> Date: Wed, 6 Apr 2022 15:54:41 -0500 Subject: [PATCH 9/9] Update ci.yaml --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 538659b2d..c62e749b3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -169,19 +169,19 @@ jobs: - name: make ref tag case 1 id: mkreftag1 - if: ${{github.event.inputs.ref}} != '' + if: ${{ github.event.inputs.ref != '' }} run: echo "::set-output name=reftag::${{github.event.inputs.ref}}" - name: make ref tag case 2 id: mkreftag2 - if: ${{github.event.inputs.ref}} == '' + if: ${{ github.event.inputs.ref == '' }} run: echo "::set-output name=reftag::${GITHUB_BASE_REF:+PR}"$(awk -F"/" '{print $3}' <<< ${GITHUB_REF}) - name: check tags run: | echo "GITHUB_REF: ${GITHUB_REF}" echo "GITHUB_BASE_REF: ${GITHUB_BASE_REF}" - echo "github.event.inputs.ref: #${{github.event.inputs.ref}}#{{github.event.inputs.ref}}#" + echo "github.event.inputs.ref: #${{github.event.inputs.ref}}#${{ github.event.inputs.ref != '' }}#${{ github.event.inputs.ref == '' }}#" echo "mkdatetag: ${{steps.mkdatetag.outputs.dtag}}" echo "mkreftag1: ${{steps.mkreftag1.outputs.reftag}}" echo "mkreftag2: ${{steps.mkreftag2.outputs.reftag}}"