From c0613655bb90265578b7d5782c43aa9cf024cdde Mon Sep 17 00:00:00 2001 From: Dale Wahl Date: Tue, 3 Jan 2023 11:11:16 +0100 Subject: [PATCH] create "stable" tag for Docker Hub images The stable image should automatically update when we make a new release (along with a new image with the version number). If users wish to use an older version, they will need to update the .env file with that version tag. Already manually pushed v1.29 to stable tag image. --- .env | 2 +- .github/workflows/docker_new_release.yml | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.env b/.env index bf9d1c5b8..b637bc896 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ # 4CAT Version: Update with latest release tag or 'latest' # https://hub.docker.com/repository/docker/digitalmethodsinitiative/4cat/tags?page=1&ordering=last_updated -DOCKER_TAG=v1.29 +DOCKER_TAG=stable # Database setup POSTGRES_USER=fourcat diff --git a/.github/workflows/docker_new_release.yml b/.github/workflows/docker_new_release.yml index 87eb87221..e8f06f9d8 100644 --- a/.github/workflows/docker_new_release.yml +++ b/.github/workflows/docker_new_release.yml @@ -14,19 +14,19 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v3 - + - name: Log in to Docker Hub uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: username: ${{ secrets.DOCKER_DALE_LOGIN }} password: ${{ secrets.DOCKER_DALE_PASSWORD }} - + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: images: digitalmethodsinitiative/4cat - + - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: @@ -35,3 +35,12 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + # Update the stable tag image + - name: Build and push "stable" Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + file: docker/Dockerfile + push: true + tags: digitalmethodsinitiative/4cat:stable