Skip to content

Commit

Permalink
Add tag
Browse files Browse the repository at this point in the history
  • Loading branch information
metadaddy committed Jul 25, 2024
1 parent 7591cce commit 14b0b56
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
name: Create and publish the Docker image

# Configures this workflow to run every time a change is pushed to the branch called `release`.
# Configures this workflow to run every time a v* tag is pushed to main, or manually
on:
push:
branches: ['release']
branches:
- 'main'
tags:
- v*
workflow_dispatch:
inputs:
tags:
description: 'Release tag'
required: true
type: string

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
Expand Down Expand Up @@ -40,6 +49,9 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# define match group
type=match,pattern=v(.*),group=1,value=${{ inputs.tag }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's
# `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path.
Expand Down

0 comments on commit 14b0b56

Please sign in to comment.