diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index bb91fbe4..64206fda 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -29,6 +29,16 @@ jobs: uses: docker/metadata-action@v4 with: images: ghcr.io/RedGecko/sitrep + tags: | + # set latest tag for default branch + type=edge,branch=develop + type=raw,value=stable,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=ref,event=branch + type=ref,event=pr,prefix=pr-,enable=true,priority=600 + type=semver,pattern={{version}},prefix=v,priority=420 + type=semver,pattern={{major}}.{{minor}},prefix=v,priority=410 + type=semver,pattern={{major}},prefix=v,priority=400 + type=sha - name: Build and push uses: docker/build-push-action@v3 with: @@ -44,6 +54,16 @@ jobs: uses: docker/metadata-action@v4 with: images: ghcr.io/RedGecko/sitrep-hasura + tags: | + # set latest tag for default branch + type=edge,branch=develop + type=raw,value=stable,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=ref,event=branch + type=ref,event=pr,prefix=pr-,enable=true,priority=600 + type=semver,pattern={{version}},prefix=v,priority=420 + type=semver,pattern={{major}}.{{minor}},prefix=v,priority=410 + type=semver,pattern={{major}},prefix=v,priority=400 + type=sha - name: Build and push uses: docker/build-push-action@v3 with: