From 5ce0ec26b3458d14829b81662d5d7d11abbc79ee Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Wed, 15 Nov 2023 17:33:25 +0800 Subject: [PATCH] Build on pull request --- .github/workflows/source.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/source.yml b/.github/workflows/source.yml index 32b9a6f..477ad0f 100644 --- a/.github/workflows/source.yml +++ b/.github/workflows/source.yml @@ -4,6 +4,8 @@ on: push: branches: ["dev-source-*", "source/*", "dev-source/*"] tags: ["source-*.*.*"] + pull_request: + branches: [main] jobs: build: @@ -12,22 +14,22 @@ jobs: name: crushftp-source runs-on: ubuntu-latest env: - CRUSHFTP_VERSION: '10.5.4' + CRUSHFTP_VERSION: "10.5.4" IS_TAG: ${{ startsWith(github.ref, 'refs/tags/') }} SKIP_DOCKER: false steps: - uses: actions/checkout@v3 - name: Set up Docker Buildx - if: ${{ success() && github.event_name != 'pull_request' }} + if: ${{ success() }} uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub if: ${{ success() && github.event_name != 'pull_request' }} uses: docker/login-action@v2 with: - username: '${{ secrets.DOCKER_HUB_USERNAME }}' - password: '${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}' + username: "${{ secrets.DOCKER_HUB_USERNAME }}" + password: "${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" - name: Build and push if: ${{ success() && env.SKIP_DOCKER != 'true' && github.event_name != 'pull_request' }}