From 1ec90add1e0fedd343e93af9f43f8e6b3550f436 Mon Sep 17 00:00:00 2001 From: Anatoli Nicolae Date: Mon, 8 Jan 2024 09:04:05 +0100 Subject: [PATCH] Prepare workflows for deployment Signed-off-by: Anatoli Nicolae --- .github/workflows/build.yml | 11 +++++++---- .github/workflows/deploy.yml | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9c93f016..877a6f4a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,8 @@ name: 🐳 Create and publish a Docker image on: push: branches: - - mainline + - main + - dev permissions: actions: write @@ -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 @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d7656a3f6..4fdb34e95 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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