Skip to content

Commit

Permalink
Push image under major.minor tag
Browse files Browse the repository at this point in the history
  • Loading branch information
tillrohrmann committed Nov 28, 2023
1 parent 990760e commit dfa88bc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ on:
type: boolean

env:
REPOSITORY_OWNER: 'restatedev'
ORG: 'restatedev'
GHCR_REGISTRY: 'ghcr.io'
GHCR_REGISTRY_USERNAME: ${{ github.actor }}
GHCR_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -83,8 +83,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
${{ env.GHCR_REGISTRY }}/${{ env.REPOSITORY_OWNER }}/${{ env.IMAGE_NAME }}
${{ inputs.pushToDockerHub && format('docker.io/{0}/{1}', env.REPOSITORY_OWNER, env.IMAGE_NAME) || '' }}
${{ env.GHCR_REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE_NAME }}
${{ inputs.pushToDockerHub && format('docker.io/{0}/{1}', env.ORG, env.IMAGE_NAME) || '' }}
# Note: We need this to generate the latest tag until we have a first stable release.
# Check https://github.com/docker/metadata-action/issues/34
Expand All @@ -94,6 +94,10 @@ jobs:
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Try to fail
run: exit 1

- name: Build${{inputs.uploadImageAsTarball != true && ' and push ' || ' '}}Docker image
id: build
Expand Down

0 comments on commit dfa88bc

Please sign in to comment.