1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 02:47:56 +01:00

generate different tag for pr

This commit is contained in:
Jason N. 2024-03-19 13:00:11 -04:00
parent c1c16f6420
commit 3b58e69ec4

View file

@ -61,25 +61,35 @@ jobs:
targetUrl: ${{ steps.jobs.outputs.html_url }}
- name: Docker meta
if: ! inputs.pr
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
context: git
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Docker meta for PR
if: inputs.pr
id: meta_pr
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
pr-${{ inputs.pr }}
- name: Buildah Build
id: build-image
uses: redhat-actions/buildah-build@v2
with:
containerfiles: Containerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags || steps.meta_pr.outputs.tags }}
labels: ${{ steps.meta.outputs.labels || steps.meta_pr.outputs.labels }}
- name: Push image
uses: redhat-actions/push-to-registry@v2