Skip to content

Commit

Permalink
image: Push Docker image on tag push
Browse files Browse the repository at this point in the history
Trigger image workflow on tag push so that so that you can use release
version string to pull cilium-cli Docker images.

Signed-off-by: Michi Mutsuzaki <[email protected]>
  • Loading branch information
michi-covalent committed Jun 26, 2024
1 parent 5146f46 commit 73638b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
push:
branches:
- main
tags:
- 'v*'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
Expand Down Expand Up @@ -41,6 +43,8 @@ jobs:
run: |
if [ ${{ github.event.pull_request.head.sha }} != "" ]; then
echo "tag=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_type }}" == "tag" ]; then
echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
else
echo "tag=${{ github.sha }}" >> $GITHUB_OUTPUT
fi
Expand All @@ -50,7 +54,7 @@ jobs:
with:
ref: ${{ steps.tag.outputs.tag }}

# main branch pushes
# main branch or tag pushes
- name: CI Build ${{ matrix.name }}
if: ${{ github.event_name != 'pull_request_target' }}
uses: docker/build-push-action@31159d49c0d4756269a0940a750801a1ea5d7003 # v6.1.0
Expand Down

0 comments on commit 73638b6

Please sign in to comment.