adjust CI. build on Pr, push on main branch (#15) #900
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and publish Mina lightweight network Docker images | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| pull_request: | |
| branches: | |
| - develop | |
| - main | |
| workflow_dispatch: {} | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 300 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USER }} | |
| password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| - name: Build Docker images | |
| if: github.event_name == 'pull_request' | |
| run: ./scripts/build-all.sh --mina-release nightly --target-branches develop,compatible,master --archs amd64,arm64 --docker-hub-user o1labs --skip-push | |
| - name: Build and push Docker images | |
| if: github.event_name != 'pull_request' | |
| run: ./scripts/build-all.sh --mina-release nightly --target-branches develop,compatible,master --archs amd64,arm64 --docker-hub-user o1labs |