Skip to content

Commit

Permalink
Merge pull request #155 from Kuadrant/fix-image-build
Browse files Browse the repository at this point in the history
Docker image with git sha only for pushes on main branch
  • Loading branch information
eguzki authored Sep 4, 2024
2 parents 248c5c9 + cf8e637 commit 8d7e9ed
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 8d7e9ed

Please sign in to comment.