diff --git a/.github/workflows/build-push-container-images-3.15.Final.yml b/.github/workflows/build-push-container-images-3.15.Final.yml index a842ec687..6baa47f5c 100644 --- a/.github/workflows/build-push-container-images-3.15.Final.yml +++ b/.github/workflows/build-push-container-images-3.15.Final.yml @@ -27,15 +27,18 @@ jobs: ref: ${{ steps.calculate_branch.outputs.ref }} branch: ${{ env.BRANCH }} steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.BRANCH }} + - name: Calculate Branch id: calculate_branch run: | if [[ ${{ github.event_name }} == 'workflow_run' ]]; then echo "ref=${{ github.event.workflow_run.head_commit.id }}" >> $GITHUB_OUTPUT - elif [[ ${{ github.event_name}} == 'workflow_dispatch' ]]; then - echo "ref=${{ github.sha }}" >> $GITHUB_OUTPUT - elif [[ ${{ github.event_name }} == 'schedule' ]]; then - echo "ref=${{ github.sha }}" >> $GITHUB_OUTPUT + elif [[ ${{ github.event_name}} == 'workflow_dispatch' || ${{ github.event_name }} == 'schedule' ]]; then + ref=$(git rev-parse @) + echo "ref=${ref}" >> $GITHUB_OUTPUT fi check-commit-count: @@ -96,7 +99,7 @@ jobs: needs: - check-commit-count - calculate-modules - if: (needs.check-commit-count.outputs.has_commits == 'true') && (needs.calculate-modules.outputs.projects_matrix != '[]') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success') && (github.event.workflow_run.head_branch == '3.15.Final')))) + if: (needs.check-commit-count.outputs.has_commits == 'true') && (needs.calculate-modules.outputs.projects_matrix != '[]') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success')))) runs-on: ubuntu-latest strategy: matrix: @@ -170,7 +173,7 @@ jobs: needs: - check-commit-count - calculate-modules - if: (needs.check-commit-count.outputs.has_commits == 'true') && (needs.calculate-modules.outputs.projects_matrix != '[]') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success') && (github.event.workflow_run.head_branch == '3.15.Final')))) + if: (needs.check-commit-count.outputs.has_commits == 'true') && (needs.calculate-modules.outputs.projects_matrix != '[]') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success')))) runs-on: ubuntu-latest strategy: fail-fast: false @@ -235,7 +238,7 @@ jobs: image: "${{ env.IMAGE_BASE_NAME }}/${{ matrix.project.name }}:${{ env.CONTAINER_TAG }}-${{ matrix.arch }}" push-app-images: - if: (needs.check-commit-count.outputs.has_commits == 'true') && (needs.calculate-modules.outputs.projects_matrix != '[]') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success') && (github.event.workflow_run.head_branch == '3.15.Final')))) + if: (needs.check-commit-count.outputs.has_commits == 'true') && (needs.calculate-modules.outputs.projects_matrix != '[]') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success')))) needs: - check-commit-count - calculate-modules @@ -281,7 +284,7 @@ jobs: run: "docker push -a ${{ env.IMAGE_BASE_NAME }}/${{ matrix.project.name }}" create-app-multiarch-manifests: - if: (needs.check-commit-count.outputs.has_commits == 'true') && (needs.calculate-modules.outputs.projects_matrix != '[]') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success') && (github.event.workflow_run.head_branch == '3.15.Final')))) + if: (needs.check-commit-count.outputs.has_commits == 'true') && (needs.calculate-modules.outputs.projects_matrix != '[]') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success')))) needs: - check-commit-count - calculate-modules @@ -321,7 +324,7 @@ jobs: docker manifest push ${{ env.IMAGE_BASE_NAME }}/${{ matrix.project.name }}:${{ env.CONTAINER_TAG }} deploy-resources: - if: (needs.check-commit-count.outputs.has_commits == 'true') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success') && (github.event.workflow_run.head_branch == '3.15.Final')))) + if: (needs.check-commit-count.outputs.has_commits == 'true') && (github.repository == 'quarkusio/quarkus-super-heroes') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name) || ((github.event_name == 'worflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch') && (github.event.workflow_run.conclusion == 'success')))) needs: - check-commit-count - create-app-multiarch-manifests