From d9fc335b466d230cecdac38c0f49f4372c93ed0e Mon Sep 17 00:00:00 2001 From: Sakurasan <1173092237@qq.com> Date: Thu, 30 Mar 2023 02:45:02 +0800 Subject: [PATCH] update action --- .github/workflows/ci.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3b03f09..920a3d7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ on: - main - dev tags: - - '*' + - 'v*' pull_request: branches: [ "main","dev" ] @@ -25,11 +25,14 @@ jobs: submodules: 'true' - name: Get current date id: date - run: echo "::set-output name=today::$(date +'%Y%m%d')" + run: echo "::set-output name=today::$(date +'%Y%m%d')" - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx + id: buildx uses: docker/setup-buildx-action@v2 + - name: Available platforms + run: echo ${{ steps.buildx.outputs.platforms }} - name: Login to DockerHub uses: docker/login-action@v2 with: @@ -47,9 +50,8 @@ jobs: platforms: linux/amd64,linux/arm64 #指定用户/仓库名 tags: | - ${{ github.repository }}:${{ github.ref_slug }} - ${{ github.repository }}:latest ${{ github.repository }}:${{ steps.date.outputs.today }} + ${{ github.repository }}:${{ contains(github.ref,'main') && 'latest' || github.ref_name }} - name: Docker Hub Description #这里是通过md文件自动生成dockerhub描述的模块,也可以不需要 uses: peter-evans/dockerhub-description@v3