Skip to content

Commit

Permalink
Only publish 4.x to MCR (#6328)
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Jul 4, 2024
1 parent cf50807 commit 3341833
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'}}

0 comments on commit 3341833

Please sign in to comment.