Skip to content

Commit

Permalink
tag
Browse files Browse the repository at this point in the history
  • Loading branch information
msaunby committed Feb 10, 2023
1 parent 060dbc5 commit cd97172
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Simple Docker image build and push

on:
push:
branches: [ "main"]
workflow_dispatch:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:

Expand All @@ -25,6 +25,9 @@ jobs:
name: Lowercase the repo name and username
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
-
name: Confirm tag name
run: echo "Tag name ${{ github.ref_name }}"
-
name: Log in to GitHub container registry
uses: docker/login-action@v2
with:
Expand All @@ -37,5 +40,5 @@ jobs:
with:
context: .
file: ./Dockerfile
tags: ghcr.io/${{ env.REPO }}:${{ github.sha }}, ghcr.io/${{ env.REPO }}:latest
tags: ghcr.io/${{ env.REPO }}:${{ github.sha }}, ghcr.io/${{ env.REPO }}:${{ github.ref_name }}, ghcr.io/${{ env.REPO }}:latest
push: True

0 comments on commit cd97172

Please sign in to comment.