From 182fd89356109b410287619d5c91662e6ec41b17 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 30 Dec 2024 13:55:04 +0530 Subject: [PATCH] [server] Retain published image commit as branch instead of tag Overwriting tags is clunky (besides being generally discouraged). e.g. pulling the overwritten tags locally requires `git fetch --force --tags`. So instead use the branch `server/ghcr` to point to the commit from which the latest published ghcr docker image has been built --- .github/workflows/server-publish.yml | 7 +++---- server/docs/publish.md | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/server-publish.yml b/.github/workflows/server-publish.yml index 1851cbcd03..b6b29bcfa1 100644 --- a/.github/workflows/server-publish.yml +++ b/.github/workflows/server-publish.yml @@ -1,4 +1,4 @@ -name: "Publish (server)" +name: "Publish ghcr (server)" on: # Run manually, providing it the commit. @@ -39,7 +39,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Tag as server/ghcr + - name: Update branch server/ghcr to point to source commit run: | - git tag -f server/ghcr - git push -f origin server/ghcr + git push -f origin HEAD:server/ghcr diff --git a/server/docs/publish.md b/server/docs/publish.md index 3a49a47611..7da3b27c60 100644 --- a/server/docs/publish.md +++ b/server/docs/publish.md @@ -40,6 +40,7 @@ Once the workflow completes, the resultant image will be available at `ghcr.io/ente-io/server`. The image will be tagged by the commit SHA. The latest image will also be tagged, well, "latest". -The workflow will also tag the commit it used to build the image with -`server/ghcr`. This tag will be overwritten on each publish, and it'll point to -the code that was used in the most recent publish. +The workflow will also update the branch `server/ghcr` to point to the commit it +used to build the image. This branch will be overwritten on each publish, and +thus it `server/ghcr` points to the code from which the most recent ghcr docker +image for museum has been built.