From 8f16238e7eb4404dbf909dde55edc2f3fd15a33b Mon Sep 17 00:00:00 2001 From: Smilin Date: Tue, 16 Apr 2024 17:58:04 +0800 Subject: [PATCH] go --- .github/workflows/docker-image.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e87c40c..4a90b6d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,12 +12,11 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - run: | + - name: Show tags + run: | git fetch --tags latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) echo "💡 Latest tag: $latest_tag" - - name: Checkout - uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -27,7 +26,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push + - name: Build and push tag + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: smile0301/auto-pixai:$latest_tag + - name: Build and push latest uses: docker/build-push-action@v5 with: context: .