Skip to content

Commit

Permalink
Prepare workflows for release
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoli Nicolae <[email protected]>
  • Loading branch information
anatolinicolae committed Jan 8, 2024
1 parent f4f6a99 commit 2c100ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: 🐳 Create and publish a Docker image
on:
push:
branches:
- mainline
- main
- dev

permissions:
actions: write
Expand All @@ -17,7 +18,7 @@ env:
jobs:
build:
name: 🐳 Build
if: ${{ github.ref == 'refs/heads/mainline' }}
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }}
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
Expand Down Expand Up @@ -52,8 +53,10 @@ jobs:
labels: |
maintainer=thundersquared
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'mainline') }}
type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value={{github.ref}}-{{sha}},enable=${{ github.ref_type != 'tag' }}
type=ref,event=branch
type=ref,event=tag
- name: 🛠 Build and push Docker image
uses: docker/build-push-action@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
build:
name: 🐳 Build
# only build/deploy main branch on pushes
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'}}
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }}
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
Expand Down

0 comments on commit 2c100ad

Please sign in to comment.