From 7ca089985a74f25a0f499c016159920cb6b970ea Mon Sep 17 00:00:00 2001 From: BillyJBryant <3013565+billyjbryant@users.noreply.github.com> Date: Tue, 30 May 2023 20:52:01 -0700 Subject: [PATCH] Updating GHA to push docker images tagged 'edge/upcoming' from merges to upcoming/* --- .github/workflows/build-and-publish.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 7436c449..b8964d37 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -4,6 +4,9 @@ on: push: tags: - v** + branches: + - 'upcoming/*' + - 'master' pull_request: branches: [ master ] @@ -48,8 +51,12 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} flavor: | - latest=${{ github.event_name == 'push' }} - tags: ${{ github.ref_name }} + latest=${{ github.ref == 'refs/heads/master' }} + tags: | + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} + type=edge,value=edge,enable=${{ startsWith(github.ref, 'refs/heads/upcoming/') }} + type=raw,value=upcoming,enable=${{ startsWith(github.ref, 'refs/heads/upcoming/') }} + type=ref,event=tag - name: Build and push Docker images uses: docker/build-push-action@v4.0.0 @@ -87,4 +94,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: args: release/ankerctl* -