Skip to content

Commit

Permalink
Update docker-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
datajohnson committed Apr 18, 2024
1 parent 061fd1a commit a74260b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Push

on:
push:
branches: [ main ]
branches: [main, test]

env:
REGISTRY: ghcr.io
Expand All @@ -22,9 +22,22 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate release tag
id: generate_release_tag
uses: amitsingh-007/next-release-tag@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
tag_template: "yyyy.mm.dd.i"

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest
tags: ghcr.io/${{ github.repository }}:${{ steps.generate_release_tag.outputs.next_release_tag }}

- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.generate_release_tag.outputs.next_release_tag }}

0 comments on commit a74260b

Please sign in to comment.