|
7 | 7 | branches: [ main, maint/* ] |
8 | 8 | pull_request: |
9 | 9 | branches: [ main, maint/* ] |
| 10 | + workflow_dispatch: |
10 | 11 |
|
11 | 12 | env: |
12 | 13 | docker-registry: docker.pkg.github.com |
|
48 | 49 | uses: actions/checkout@v2 |
49 | 50 | with: |
50 | 51 | fetch-depth: 0 |
51 | | - if: github.event_name == 'push' |
| 52 | + if: github.event_name != 'pull_request' |
52 | 53 | - name: Setup QEMU |
53 | 54 | run: docker run --rm --privileged multiarch/qemu-user-static:register --reset |
54 | 55 | if: matrix.container.qemu == true |
|
59 | 60 | DOCKER_REGISTRY: ${{ env.docker-registry }} |
60 | 61 | GITHUB_TOKEN: ${{ secrets.github_token }} |
61 | 62 | working-directory: ${{ env.docker-config-path }} |
62 | | - if: github.event_name == 'push' |
| 63 | + if: github.event_name != 'pull_request' |
63 | 64 | - name: Build and publish image |
64 | 65 | run: | |
65 | 66 | if [ "${{ matrix.container.base }}" != "" ]; then |
|
68 | 69 | docker build -t ${{ env.docker-registry-container-sha }} ${BASE_ARG} -f ${{ env.dockerfile }} . |
69 | 70 | docker push ${{ env.docker-registry-container-sha }} |
70 | 71 | working-directory: ${{ env.docker-config-path }} |
71 | | - if: github.event_name == 'push' && env.docker-container-exists != 'true' |
| 72 | + if: github.event_name != 'pull_request' && env.docker-container-exists != 'true' |
72 | 73 |
|
73 | 74 | # Run our CI/CD builds. We build a matrix with the various build targets |
74 | 75 | # and their details. Then we build either in a docker container (Linux) |
@@ -292,4 +293,4 @@ jobs: |
292 | 293 | path: api-documentation.zip |
293 | 294 | - name: Push documentation branch |
294 | 295 | run: git push origin gh-pages |
295 | | - if: github.event_name == 'push' && github.repository == 'libgit2/libgit2' |
| 296 | + if: github.event_name != 'pull_request' && github.repository == 'libgit2/libgit2' |
0 commit comments