ci: updated workflow

This commit is contained in:
sai80082 committed 2024-11-30 14:56:22 +05:30
1 parent eba40dbd23
commit 44a09f33da
2 files changed
+13 -2

No files matched your search

+8 -2
View File
@@ -7,6 +7,8 @@ on:
jobs:
release:
# Only run on the original repository, not forks
if: ${{ github.repository_owner == 'varun-raj' }}
runs-on: ubuntu-latest
permissions:
contents: write
@@ -32,7 +34,7 @@ jobs:
contents: read
packages: write
needs: release
if: needs.release.outputs.new-release-published == 'true'
if: always() && !failure()
steps:
- uses: actions/checkout@v3
- uses: docker/metadata-action@v5
@@ -42,7 +44,8 @@ jobs:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=raw,value=latest,enable=${{ github.repository_owner != 'varun-raj' || needs.release.outputs.new-release-published == 'true' }}
type=semver,pattern={{major}}.{{minor}}.{{patch}},enable=${{ github.repository_owner == 'varun-raj' && needs.release.outputs.new-release-published == 'true' }}
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
@@ -56,6 +59,9 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ needs.release.outputs.new-release-version || 'dev' }}