Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: build release containers from tags rather than branches (#3739)

Andrew Williamsc9c40bc87614
diff --git a/.github/workflows/build-and-push-release-image.yml b/.github/workflows/build-and-push-release-image.yml
index 5643aa752..5f04291d5 100644
--- a/.github/workflows/build-and-push-release-image.yml
+++ b/.github/workflows/build-and-push-release-image.yml
@@ -2,9 +2,9 @@ name: build-and-push-release-image
on:
push:
- branches:
- # Run on pushing branches like `release/1.0.0`
- - "release/*.*.*"
+ tags:
+ # Run on pushing a tag in the format of 'v0.0.0'
+ - "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build-and-push-release-image:
@@ -19,10 +19,10 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Extract build args
- # Extract version from branch name
- # Example: branch name `release/1.0.0` sets up env.VERSION=1.0.0
+ # Extract version from tag name
+ # Example: tag name `v1.0.0` sets up env.VERSION=1.0.0
run: |
- echo "VERSION=${GITHUB_REF_NAME#release/}" >> $GITHUB_ENV
+ echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3