From 88bb2fb8dda6b1b9bf5ed43abb8ad2c27c35058e Mon Sep 17 00:00:00 2001 From: nearlynocturnalbeach <115465063+nearlynocturnalbeach@users.noreply.github.com> Date: Fri, 17 May 2024 13:37:51 +0100 Subject: [PATCH 1/2] Add version label to container image --- .github/workflows/docker-image.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 380545b..d113e33 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -35,6 +35,7 @@ jobs: push: true platforms: linux/arm64,linux/amd64 tags: ${{ secrets.DOCKER_HUB_USERNAME }}/nearbeach:latest + labels: version=${{ github.event.client_payload.version }} - name: Build and push versioned - ${{ github.event.client_payload.version }} uses: docker/build-push-action@v2 @@ -44,6 +45,7 @@ jobs: push: true platforms: linux/arm64,linux/amd64 tags: ${{ secrets.DOCKER_HUB_USERNAME }}/nearbeach:${{ github.event.client_payload.version }} + labels: version=${{ github.event.client_payload.version }} - name: Notify Discord run: | From f11190e6ee5587aec9fde31af08a918372bc8da2 Mon Sep 17 00:00:00 2001 From: nearlynocturnalbeach Date: Fri, 17 May 2024 14:01:42 +0100 Subject: [PATCH 2/2] Combine build latest and version actions --- .github/workflows/docker-image.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d113e33..d121dce 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,7 +15,7 @@ jobs: name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Checkout + name: Checkout uses: actions/checkout@v2 - name: Login to Docker Hub @@ -34,17 +34,7 @@ jobs: file: ./Dockerfile push: true platforms: linux/arm64,linux/amd64 - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/nearbeach:latest - labels: version=${{ github.event.client_payload.version }} - - - name: Build and push versioned - ${{ github.event.client_payload.version }} - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile - push: true - platforms: linux/arm64,linux/amd64 - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/nearbeach:${{ github.event.client_payload.version }} + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/nearbeach:latest,${{ secrets.DOCKER_HUB_USERNAME }}/nearbeach:${{ github.event.client_payload.version }} labels: version=${{ github.event.client_payload.version }} - name: Notify Discord