From 1a79599a17582680a0cc27421aeb58f96f416045 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 16:54:05 +0200 Subject: [PATCH 01/16] Initial CI commit --- .github/workflows/ci-wip.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci-wip.yml diff --git a/.github/workflows/ci-wip.yml b/.github/workflows/ci-wip.yml new file mode 100644 index 00000000..4804781c --- /dev/null +++ b/.github/workflows/ci-wip.yml @@ -0,0 +1,36 @@ +on: + push: + branches: + - feature/github-ci + pull_request: + branches: + - feature/github-ci + types: [opened, reopened, synchronize] + +name: ci-wip + +env: + DOTNET_VERSION: 7.0.x + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET SDK ${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test + run: dotnet test --no-restore --verbosity normal From 18d538aef60eb83d25fe41a77288810fee5246fc Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:06:13 +0200 Subject: [PATCH 02/16] Add attempt to upload artifacts --- .github/workflows/ci-wip.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci-wip.yml b/.github/workflows/ci-wip.yml index 4804781c..5cc2b1a4 100644 --- a/.github/workflows/ci-wip.yml +++ b/.github/workflows/ci-wip.yml @@ -34,3 +34,11 @@ jobs: - name: Test run: dotnet test --no-restore --verbosity normal + + - name: Upload internal artifacts + uses: actions/upload-artifact@v3 + with: + name: libraries + path: | + **/bin/Release/**/*.dll + retention-days: 1 From 3c7145e262f3b7659a09c0ba195c364b53ed69ba Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:08:17 +0200 Subject: [PATCH 03/16] Narrow release artifacts to only ShockLink.*.dll --- .github/workflows/ci-wip.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-wip.yml b/.github/workflows/ci-wip.yml index 5cc2b1a4..59436f03 100644 --- a/.github/workflows/ci-wip.yml +++ b/.github/workflows/ci-wip.yml @@ -38,7 +38,7 @@ jobs: - name: Upload internal artifacts uses: actions/upload-artifact@v3 with: - name: libraries + name: artifacts path: | - **/bin/Release/**/*.dll + **/bin/Release/**/ShockLink.*.dll retention-days: 1 From 2ed5b1f78cd64f9652d18a765dd791f319fdbd56 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:13:53 +0200 Subject: [PATCH 04/16] Move artifacts to home dir to prevent path from being included in upload --- .github/workflows/ci-wip.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-wip.yml b/.github/workflows/ci-wip.yml index 59436f03..8907c6b6 100644 --- a/.github/workflows/ci-wip.yml +++ b/.github/workflows/ci-wip.yml @@ -35,10 +35,13 @@ jobs: - name: Test run: dotnet test --no-restore --verbosity normal + - name: Grab artifacts + run: cp API/**/bin/Release/**/ShockLink.*.dll . + - name: Upload internal artifacts uses: actions/upload-artifact@v3 with: name: artifacts - path: | - **/bin/Release/**/ShockLink.*.dll + path: ShockLink.*.dll retention-days: 1 + if-no-files-found: error From ab33cacd7bfab04df6379c3a65181dac25bc473e Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:15:23 +0200 Subject: [PATCH 05/16] Attempt to fix artifact path --- .github/workflows/ci-wip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-wip.yml b/.github/workflows/ci-wip.yml index 8907c6b6..7fe153a4 100644 --- a/.github/workflows/ci-wip.yml +++ b/.github/workflows/ci-wip.yml @@ -36,7 +36,7 @@ jobs: run: dotnet test --no-restore --verbosity normal - name: Grab artifacts - run: cp API/**/bin/Release/**/ShockLink.*.dll . + run: cp **/bin/Release/**/ShockLink.*.dll . - name: Upload internal artifacts uses: actions/upload-artifact@v3 From c338687e4c7ae1e34599356ffdf1c063103eb1e6 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:17:01 +0200 Subject: [PATCH 06/16] Specify project when grabbing artifacts --- .github/workflows/ci-wip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-wip.yml b/.github/workflows/ci-wip.yml index 7fe153a4..9e7ba472 100644 --- a/.github/workflows/ci-wip.yml +++ b/.github/workflows/ci-wip.yml @@ -36,7 +36,7 @@ jobs: run: dotnet test --no-restore --verbosity normal - name: Grab artifacts - run: cp **/bin/Release/**/ShockLink.*.dll . + run: cp API/bin/Release/**/ShockLink.*.dll . - name: Upload internal artifacts uses: actions/upload-artifact@v3 From 310746394fae13536bd0aef9326c73852ab5cf0a Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:20:54 +0200 Subject: [PATCH 07/16] Add Github Runners to dependabot.yml --- .github/dependabot.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e4ca311d..bdf3ed3c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,15 @@ version: 2 updates: - - package-ecosystem: "nuget" # See documentation for possible values - directory: "/" # Location of package manifests + + # Check for Github Actions version updates (for CI/CD) + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + # Check for Nuget package updates + - package-ecosystem: "nuget" + directory: "/" schedule: interval: "daily" From 501c62451bf5afa9a020caca11971e14fc403eda Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:28:47 +0200 Subject: [PATCH 08/16] Add simplified Dockerfile and build-container CI phase --- .github/workflows/ci-master.yml | 104 ++++++++++++++++++++++++++++++++ .github/workflows/ci-wip.yml | 47 --------------- 2 files changed, 104 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/ci-master.yml delete mode 100644 .github/workflows/ci-wip.yml diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml new file mode 100644 index 00000000..058a8df1 --- /dev/null +++ b/.github/workflows/ci-master.yml @@ -0,0 +1,104 @@ +on: + push: + branches: + - master + - feature/github-ci + pull_request: + branches: + - master + - feature/github-ci + types: [opened, reopened, synchronize] + +name: ci-master + +env: + DOTNET_VERSION: 7.0.x + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository_owner }}/shocklink-api + +jobs: + + build-api: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET SDK ${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test + run: dotnet test --no-restore --verbosity normal + + - name: Grab artifacts + run: cp API/bin/Release/**/ShockLink.*.dll . + + - name: Upload internal artifacts + uses: actions/upload-artifact@v3 + with: + name: artifacts + path: ShockLink.*.dll + retention-days: 1 + if-no-files-found: error + + build-container: + runs-on: ubuntu-latest + needs: build-api + + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: artifacts + + - name: Log in to container registry + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value={{branch}},enable=${{ github.ref_name == 'master' }} + type=ref,event=branch + type=ref,event=pr + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # publish: + # runs-on: ubuntu-latest + # needs: build + + # steps: + # - name: Download release notes + # uses: actions/checkout@v4 + # with: + # sparse-checkout: | + # RELEASE.md + + # - name: Download artifacts + # uses: actions/download-artifact@v3 + # with: + # name: artifacts \ No newline at end of file diff --git a/.github/workflows/ci-wip.yml b/.github/workflows/ci-wip.yml deleted file mode 100644 index 9e7ba472..00000000 --- a/.github/workflows/ci-wip.yml +++ /dev/null @@ -1,47 +0,0 @@ -on: - push: - branches: - - feature/github-ci - pull_request: - branches: - - feature/github-ci - types: [opened, reopened, synchronize] - -name: ci-wip - -env: - DOTNET_VERSION: 7.0.x - -jobs: - - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup .NET SDK ${{ env.DOTNET_VERSION }} - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - name: Install dependencies - run: dotnet restore - - - name: Build - run: dotnet build --configuration Release --no-restore - - - name: Test - run: dotnet test --no-restore --verbosity normal - - - name: Grab artifacts - run: cp API/bin/Release/**/ShockLink.*.dll . - - - name: Upload internal artifacts - uses: actions/upload-artifact@v3 - with: - name: artifacts - path: ShockLink.*.dll - retention-days: 1 - if-no-files-found: error From 0eff08741fd7632716c8536ef415b2ceace4a8a7 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:29:36 +0200 Subject: [PATCH 09/16] Add missing line to login action --- .github/workflows/ci-master.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 058a8df1..fbbcc7cb 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -63,7 +63,8 @@ jobs: with: name: artifacts - - name: Log in to container registry + - name: Log in to Container Registry + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} From 45e5515af198dce9a7859cfcde28e1b7fb37826c Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:31:28 +0200 Subject: [PATCH 10/16] Ensure to actually checkout the Dockerfile before trying to build --- .github/workflows/ci-master.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index fbbcc7cb..638cc645 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -55,6 +55,12 @@ jobs: needs: build-api steps: + - name: Checkout + uses: actions/checkout@v4 + with: + sparse-checkout: | + Dockerfile + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From c5343774c2f30d0b4ae932aea8039feb8fe607f3 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:33:02 +0200 Subject: [PATCH 11/16] Actually commit the Dockerfile --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..42fa08b0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine +WORKDIR /app +COPY *.dll . +ENTRYPOINT ["dotnet", "ShockLink.API.dll"] From 18b86729438310f1b865264292a10ba2294f6139 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:51:17 +0200 Subject: [PATCH 12/16] Actually dotnet publish and upload those artifacts --- .github/workflows/ci-master.yml | 16 ++++++++++++++-- Dockerfile | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 638cc645..b295d1b8 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -39,8 +39,19 @@ jobs: - name: Test run: dotnet test --no-restore --verbosity normal + - name: Publish + run: dotnet publish "API.csproj" -c Release -o ./publish + + - name: Upload full artifacts + uses: actions/upload-artifact@v3 + with: + name: full + path: publish/* + retention-days: 1 + if-no-files-found: error + - name: Grab artifacts - run: cp API/bin/Release/**/ShockLink.*.dll . + run: cp publish/**/ShockLink.*.dll . - name: Upload internal artifacts uses: actions/upload-artifact@v3 @@ -67,7 +78,8 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v3 with: - name: artifacts + name: full + path: publish/ - name: Log in to Container Registry uses: docker/login-action@v3 diff --git a/Dockerfile b/Dockerfile index 42fa08b0..6ce9ea7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine WORKDIR /app -COPY *.dll . +COPY publish . ENTRYPOINT ["dotnet", "ShockLink.API.dll"] From 9468524aeeddba6150d4325c87703d12e7911f39 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:54:05 +0200 Subject: [PATCH 13/16] Fix reference to project root in publish stage --- .github/workflows/ci-master.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index b295d1b8..e2df4e8e 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -39,8 +39,8 @@ jobs: - name: Test run: dotnet test --no-restore --verbosity normal - - name: Publish - run: dotnet publish "API.csproj" -c Release -o ./publish + - name: Dotnet Publish + run: dotnet publish API/API.csproj -c Release -o ./publish - name: Upload full artifacts uses: actions/upload-artifact@v3 From 9d68e0430673d9e151ea52ce3eb42e00165e5231 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 17:58:49 +0200 Subject: [PATCH 14/16] Attempt to fix secondary artifact upload --- .github/workflows/ci-master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index e2df4e8e..76ca8c6a 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -51,7 +51,7 @@ jobs: if-no-files-found: error - name: Grab artifacts - run: cp publish/**/ShockLink.*.dll . + run: cp publish/ShockLink.*.dll . - name: Upload internal artifacts uses: actions/upload-artifact@v3 From e0e2c16a1819746d353a47778027b8cb85c0024e Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Thu, 21 Sep 2023 18:35:35 +0200 Subject: [PATCH 15/16] Add deployment instructions to README --- .github/workflows/ci-master.yml | 11 ++++------- README.md | 28 ++++++++++++++++++++++++++++ docker-compose.yml | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 76ca8c6a..c1e04ebf 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -45,19 +45,16 @@ jobs: - name: Upload full artifacts uses: actions/upload-artifact@v3 with: - name: full + name: full-dotnet-app path: publish/* retention-days: 1 if-no-files-found: error - - name: Grab artifacts - run: cp publish/ShockLink.*.dll . - - name: Upload internal artifacts uses: actions/upload-artifact@v3 with: - name: artifacts - path: ShockLink.*.dll + name: only-shocklink-dlls + path: publish/ShockLink.*.dll retention-days: 1 if-no-files-found: error @@ -78,7 +75,7 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v3 with: - name: full + name: full-dotnet-app path: publish/ - name: Log in to Container Registry diff --git a/README.md b/README.md new file mode 100644 index 00000000..b37938ef --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# ShockLink API + + +# Deployment + +The ShockLink stack consists of the following components: +- Postgres as database +- Redis +- The API (this repository) +- [The WebUI](https://github.com/Shock-Link/WebUI) + +## Using Docker + +Assuming you have all other required containers running (if not, see above), you can run the following command to start the API: + +```bash +docker run \ + ghcr.io/shock-link/shocklink-api:latest \ + --name shocklink-api \ + -e FRONTEND_BASE_URL=localhost \ + -e DB=localhost \ + -e REDIS_HOST=localhost \ + -p 80:80/tcp +``` + +## Using `docker-compose` + +See [docker-compose.yml](docker-compose.yml). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..16e8c9b2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,33 @@ +# This file is a minimal example of a runnable ShockLink stack. + +version: '3.9' + +services: + + db: + image: postgres:16 + container_name: shocklink-pg + environment: + - POSTGRES_PASSWORD=postgres + + redis: + image: redislabs/redisearch:latest + + api: + image: ghcr.io/shock-link/shocklink-api:latest + depends_on: + - db + - redis + ports: + - "5001:80/tcp" + environment: + - FRONTEND_BASE_URL=localhost + - REDIS_HOST=redis + - DB=db + + webui: + image: ghcr.io/shock-link/shocklink-webui:latest + depends_on: + - api + ports: + - "5002:80/tcp" From 50c2ad729cdd256d24fc83a2db15655f74efff4c Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sat, 23 Sep 2023 19:39:10 +0200 Subject: [PATCH 16/16] Add develop branch CI --- .github/workflows/ci-develop.yml | 119 +++++++++++++++++++++++++++++++ .github/workflows/ci-master.yml | 5 +- 2 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci-develop.yml diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml new file mode 100644 index 00000000..5e28abd6 --- /dev/null +++ b/.github/workflows/ci-develop.yml @@ -0,0 +1,119 @@ +on: + push: + branches: + - develop + pull_request: + branches: + - develop + types: [opened, reopened, synchronize] + +name: ci-develop + +env: + BRANCH: develop + DOTNET_VERSION: 7.0.x + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository_owner }}/shocklink-api + +jobs: + + build-api: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET SDK ${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test + run: dotnet test --no-restore --verbosity normal + + - name: Dotnet Publish + run: dotnet publish API/API.csproj -c Release -o ./publish + + - name: Upload full artifacts + uses: actions/upload-artifact@v3 + with: + name: full-dotnet-app + path: publish/* + retention-days: 1 + if-no-files-found: error + + - name: Upload internal artifacts + uses: actions/upload-artifact@v3 + with: + name: only-shocklink-dlls + path: publish/ShockLink.*.dll + retention-days: 1 + if-no-files-found: error + + build-container: + runs-on: ubuntu-latest + needs: build-api + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + sparse-checkout: | + Dockerfile + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: full-dotnet-app + path: publish/ + + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value={{branch}},enable=${{ github.ref_name == env.BRANCH }} + type=ref,event=branch + type=ref,event=pr + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # publish: + # runs-on: ubuntu-latest + # needs: build + + # steps: + # - name: Download release notes + # uses: actions/checkout@v4 + # with: + # sparse-checkout: | + # RELEASE.md + + # - name: Download artifacts + # uses: actions/download-artifact@v3 + # with: + # name: artifacts \ No newline at end of file diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index c1e04ebf..8d9ebbe7 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -2,16 +2,15 @@ on: push: branches: - master - - feature/github-ci pull_request: branches: - master - - feature/github-ci types: [opened, reopened, synchronize] name: ci-master env: + BRANCH: master DOTNET_VERSION: 7.0.x REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository_owner }}/shocklink-api @@ -91,7 +90,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value={{branch}},enable=${{ github.ref_name == 'master' }} + type=raw,value={{branch}},enable=${{ github.ref_name == env.BRANCH }} type=ref,event=branch type=ref,event=pr