Skip to content

Commit

Permalink
docker image with git sha only for pushes on main branch
Browse files Browse the repository at this point in the history
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
  • Loading branch information
eguzki committed Sep 3, 2024
1 parent 248c5c9 commit cf8e637
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/build-images-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ on:
type: string

env:
IMG_TAGS: ${{ github.sha }} ${{ inputs.operatorTag }}
IMG_TAGS: ${{ inputs.operatorTag }}
VERSION: ${{ inputs.operatorVersion }}
IMG_REGISTRY_HOST: quay.io
IMG_REGISTRY_ORG: kuadrant
Expand All @@ -65,6 +65,11 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Add git sha tag for the main branch
if: ${{ github.ref_name == env.MAIN_BRANCH_NAME }}
id: add-git-sha-tag
run: |
echo "IMG_TAGS=${{ github.sha }} ${{ env.IMG_TAGS }}" >> $GITHUB_ENV
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
Expand Down Expand Up @@ -117,6 +122,11 @@ jobs:
LIMITADOR_VERSION=${{ inputs.limitadorVersion }} \
REPLACES_VERSION=${{ inputs.replacesVersion }} \
CHANNELS=${{ inputs.channels }}
- name: Add git sha tag for the main branch
if: ${{ github.ref_name == env.MAIN_BRANCH_NAME }}
id: add-git-sha-tag
run: |
echo "IMG_TAGS=${{ github.sha }} ${{ env.IMG_TAGS }}" >> $GITHUB_ENV
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
Expand Down Expand Up @@ -163,6 +173,11 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Add git sha tag for the main branch
if: ${{ github.ref_name == env.MAIN_BRANCH_NAME }}
id: add-git-sha-tag
run: |
echo "IMG_TAGS=${{ github.sha }} ${{ env.IMG_TAGS }}" >> $GITHUB_ENV
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
Expand Down

0 comments on commit cf8e637

Please sign in to comment.