diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 22fec96074aa..4e9646526eee 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -36,14 +36,19 @@ jobs: - name: Get image tag from git tag (release) or latest (branch) run: | - echo "tag=${GITHUB_REF#refs/tags/ccf-}" >> $GITHUB_OUTPUT + CCF_RELEASE=${GITHUB_REF#refs/tags/ccf-} + echo "tag=${CCF_RELEASE}" >> $GITHUB_OUTPUT + echo "major_release=${CCF_RELEASE:0:1}" >> $GITHUB_OUTPUT id: tref - name: Build ${{ matrix.type }} container for ${{ matrix.platform }}${{ matrix.run_js && ', (JS)' || '' }} using clang ${{ matrix.clang_version }} run: docker build -f docker/app_${{ matrix.type }} . --build-arg="clang_version=${{ matrix.clang_version }}" --build-arg="platform=${{ matrix.platform }}" --build-arg="ansible_vars=ccf_ver=${{ steps.tref.outputs.tag }} ${{ matrix.run_js && 'run_js=true' || '' }}" -t $ACR_REGISTRY/public/ccf/app/${{ matrix.type }}${{ matrix.run_js && '-js' || '' }}:${{ steps.tref.outputs.tag }}-${{ matrix.platform }} + if: ${{ steps.tref.outputs.major_release == '4'}} - name: Log in run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_APP_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY + if: ${{ steps.tref.outputs.major_release == '4'}} - name: Push App container run: docker push $ACR_REGISTRY/public/ccf/app/${{ matrix.type }}${{ matrix.run_js && '-js' || '' }}:${{ steps.tref.outputs.tag }}-${{ matrix.platform }} + if: ${{ steps.tref.outputs.major_release == '4'}}