Skip to content

Commit

Permalink
automatically trigger workflow on push to main. Change image tagging …
Browse files Browse the repository at this point in the history
…convention
  • Loading branch information
tomeindl committed Apr 26, 2024
1 parent dc041a5 commit 72e9eea
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build and publish image

on:
push:
branches:
- main
workflow_dispatch:

jobs:
Expand All @@ -23,6 +26,7 @@ jobs:
${{ runner.os }}-
- uses: nelonoel/branch-name@v1.0.1

- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
Expand All @@ -33,9 +37,9 @@ jobs:
with:
image: mega-frontend
registry: ghcr.io
username: ${{ github.repository }}
password: ${{ secrets.GITHUB_TOKEN }}
dockerfile: Containerfile
addLatest: true
tags: ${{ steps.vars.outputs.sha_short }},latest
buildArgs: BRANCH=${BRANCH_NAME},COMMIT=${{ steps.vars.outputs.sha_short }},VERSION=${{ steps.vars.outputs.sha_short }}
username: ${{ github.repository }}
password: ${{ secrets.GITHUB_TOKEN }}
# addLatest: true
# tags: ${{ steps.vars.outputs.sha_short }},latest

0 comments on commit 72e9eea

Please sign in to comment.