diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 4f6d295..71056cf 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -13,14 +13,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Get current date - id: date - run: echo "::set-output name=today::$(date +'%Y-%m-%d_%H-%M')" + - uses: actions/checkout@v4 # 登录到GitHub Container Registry - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -29,12 +26,5 @@ jobs: - name: Build the Docker image run: docker build --tag ghcr.io/${{ github.repository }}:latest - - name: add date tag - run: docker tag ghcr.io/${{ github.repository }}:latest ghcr.io/${{ github.repository }}:${{ steps.date.outputs.today }} - - # 推送镜像到GitHub Container Registry - - name: Push the Docker image - run: docker push ghcr.io/${{ github.repository }}:${{ steps.date.outputs.today }} - - name: Push latest tag run: docker push ghcr.io/${{ github.repository }}:latest