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 929270c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 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'
REPOSITORY_OWNER: ${{ github.repository_owner }}
GHCR_REGISTRY: 'ghcr.io'
GHCR_REGISTRY_USERNAME: ${{ github.actor }}
GHCR_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -80,20 +80,21 @@ jobs:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ env.GHCR_REGISTRY }}/${{ env.REPOSITORY_OWNER }}/${{ env.IMAGE_NAME }}
${{ inputs.pushToDockerHub && format('docker.io/{0}/{1}', env.REPOSITORY_OWNER, 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
flavor: |
latest=true
${{ inputs.debug && 'prefix=debug-,onlatest=true' || '' }}
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 929270c

Please sign in to comment.