Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Push on release tags
Browse files Browse the repository at this point in the history
  • Loading branch information
andresuribe87 authored Jun 15, 2023
1 parent e3550d6 commit 97d7a26
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/image-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ name: Create and publish a Docker images
on:
push:
branches: ['main']
tags:
- 'v*.*.*'

env:
REGISTRY: ghcr.io
Expand All @@ -38,9 +40,17 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
Expand All @@ -49,4 +59,4 @@ jobs:
file: build/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 97d7a26

Please sign in to comment.