From 366f1206eddf4e89af47cf4b3d8658464daa8842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Tue, 8 Oct 2024 18:19:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=91=E5=B8=83=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E4=BB=A5=E5=90=AF=E7=94=A8=E5=9F=BA=E4=BA=8E?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=9A=84=E6=9E=84=E5=BB=BA=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release-tag.yaml | 11 +---------- .github/workflows/release-nightly.yaml | 12 ++---------- README.md | 14 +++++++++++++- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.gitea/workflows/release-tag.yaml b/.gitea/workflows/release-tag.yaml index 201b541..29f9363 100644 --- a/.gitea/workflows/release-tag.yaml +++ b/.gitea/workflows/release-tag.yaml @@ -46,19 +46,10 @@ jobs: images: | docker.io/${{ env.DOCKER_IMAGE_NAME }} tags: | - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} type=semver,pattern={{major}} type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }} - # type=pep440,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/') }} - - # type=schedule,pattern={{date 'YYYYMMDD-HHmmss' tz='UTC'}} - # type=ref,event=branch - # type=ref,event=pr - # type=semver,pattern={{version}} - # type=semver,pattern={{major}}.{{minor}}.{{patch}} - # type=sha - - name: Print metadata run: | echo "tags: ${{ steps.meta.outputs.tags }}" diff --git a/.github/workflows/release-nightly.yaml b/.github/workflows/release-nightly.yaml index 875d95e..b30f56a 100644 --- a/.github/workflows/release-nightly.yaml +++ b/.github/workflows/release-nightly.yaml @@ -1,3 +1,4 @@ +# https://gitea.com/gitea/act_runner/src/commit/0e2a3e00f5b32d5407f4f929a1ae61d3df825362/.gitea/workflows/release-nightly.yml name: Release Nightly on: @@ -38,19 +39,10 @@ jobs: images: | ghcr.io/${{ env.GHCR_IMAGE_NAME }} tags: | - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} type=semver,pattern={{major}} type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }} - # type=pep440,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/') }} - - # type=schedule,pattern={{date 'YYYYMMDD-HHmmss' tz='UTC'}} - # type=ref,event=branch - # type=ref,event=pr - # type=semver,pattern={{version}} - # type=semver,pattern={{major}}.{{minor}}.{{patch}} - # type=sha - - name: Print metadata run: | echo "tags: ${{ steps.meta.outputs.tags }}" diff --git a/README.md b/README.md index 3faadaa..cc3b6c1 100644 --- a/README.md +++ b/README.md @@ -1 +1,13 @@ -# docker-example \ No newline at end of file +# docker-example + +``` + # type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + # type=pep440,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/') }} + + # type=schedule,pattern={{date 'YYYYMMDD-HHmmss' tz='UTC'}} + # type=ref,event=branch + # type=ref,event=pr + # type=semver,pattern={{version}} + # type=semver,pattern={{major}}.{{minor}}.{{patch}} + # type=sha +``` \ No newline at end of file