From 3a91b9472adfd802dfcdfc92d2eb6ba71be6296d Mon Sep 17 00:00:00 2001 From: zc Date: Mon, 5 Feb 2024 11:31:46 +0800 Subject: [PATCH] fix release and docker build action --- .github/workflows/build.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4fb6b34d6cd..2edb33770879 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,7 +127,7 @@ jobs: release-and-push: name: Release And Push runs-on: ubuntu-latest - if: github.repository == 'casbin/casdoor' && github.event_name == 'push' + if: github.event_name == 'push' needs: [ frontend, backend, linter, e2e ] steps: - name: Checkout @@ -182,29 +182,24 @@ jobs: with: version: latest - - name: Log in to Docker Hub + - name: Login to Docker Hub uses: docker/login-action@v1 - if: github.repository == 'casbin/casdoor' && github.event_name == 'push' && steps.should_push.outputs.push=='true' + if: github.event_name == 'push' && steps.should_push.outputs.push=='true' with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Push to Docker Hub uses: docker/build-push-action@v3 - if: github.repository == 'casbin/casdoor' && github.event_name == 'push' && steps.should_push.outputs.push=='true' + if: github.event_name == 'push' && steps.should_push.outputs.push=='true' with: context: . - target: STANDARD - platforms: linux/amd64 + file: Dockerfile push: true - tags: casbin/casdoor:${{steps.get-current-tag.outputs.tag }},casbin/casdoor:latest - - - name: Push All In One Version to Docker Hub - uses: docker/build-push-action@v3 - if: github.repository == 'casbin/casdoor' && github.event_name == 'push' && steps.should_push.outputs.push=='true' - with: - context: . - target: ALLINONE - platforms: linux/amd64 - push: true - tags: casbin/casdoor-all-in-one:${{steps.get-current-tag.outputs.tag }},casbin/casdoor-all-in-one:latest + platforms: linux/amd64,linux/arm64,linux/arm + builder: ${{ steps.buildx.outputs.name }} + cache-from: type=gha,scope=${{ github.workflow }} + cache-to: type=gha,mode=max,scope=${{ github.workflow }} + tags: | + 99nil/user:${{steps.get-current-tag.outputs.tag }} + 99nil/user:latest