From 001b6a2f6bfefa984b2a412fe824d160a116ee2a Mon Sep 17 00:00:00 2001 From: apple Date: Mon, 24 Jun 2024 15:51:59 +0800 Subject: [PATCH] fix github actions --- .github/workflows/docker-publish.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index b4424ba..d10419d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -11,6 +11,14 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: ghcr.io/${{ github.repository }} + tags: | + type=ref,event=tag + type=sha,prefix=commit- - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -27,4 +35,4 @@ jobs: with: context: . push: true - tags: ghcr.io/${{ github.repository }}:${{ github.ref#refs/tags/ }} \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file