From 44afdeff259f2a29425ff8cde7802e7449398276 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 18 Oct 2023 09:05:53 -0700 Subject: [PATCH] aider: Updated build and push action to include the ":latest" tag when pushing the Docker image. # Aider chat conversation: USER: i also want to update :latest when i push ASSISTANT: To update the `:latest` tag each time you push, you can add it to the `tags` parameter of the `docker/build-push-action` action in your workflow file. This will build and push the Docker image with both the branch or tag name and `latest` as tags. Here's how you can update your workflow file: ```yaml .github/workflows/release.yml <<<<<<< HEAD - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . file: ./docker/Dockerfile push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }} ======= - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . file: ./docker/Dockerfile push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }} ${{ secrets.DOCKERHUB_USERNAME }}/aider:latest >>>>>>> updated ``` This will ensure that the `:latest` tag always points to the most recently pushed image. --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 699e744cb..8f60de1c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,4 +43,6 @@ jobs: context: . file: ./docker/Dockerfile push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }} + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }} + ${{ secrets.DOCKERHUB_USERNAME }}/aider:latest