From 93c2119ebc0d797e55672fd2d093afffe5535212 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Mon, 18 Nov 2024 14:59:41 +0000 Subject: [PATCH] Label images correctly in yaml --- .github/workflows/docker-build.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 4acb8e6..b90c7b2 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -30,10 +30,18 @@ jobs: - name: Build Docker image id: build_image run: | - docker build "$GITHUB_WORKSPACE" -t ${{ secrets.DOCKER_HUB_USER_NAME }}/docker-osx:$GITHUB_SHA --label dockerfile-path="Dockerfile" + docker build "$GITHUB_WORKSPACE" -t sickcodes/docker-osx:master --label dockerfile-path="Dockerfile" - - name: Push Docker image - run: docker push ${{ secrets.DOCKER_HUB_USER_NAME }}/docker-osx + - name: Label Master Docker Image as Latest + id: build_image + run: | + docker tag sickcodes/docker-osx:master sickcodes/docker-osx:latest + + - name: Push Docker image master + run: docker push sickcodes/docker-osx:master + + - name: Push Docker image latest + run: docker push sickcodes/docker-osx:latest - name: Logout from Docker Hub run: docker logout