diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-02-15 16:03:23 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-02-15 16:04:10 +0000 |
commit | 935f85131fa106730bbf66d49808b5aca375f729 (patch) | |
tree | 01f7efcf10c38193169b5fe0a4a0500bd2f3df15 /.github | |
parent | a4218a07f828366d874fe67b6f89ef74a0781ede (diff) | |
download | libgit2-935f85131fa106730bbf66d49808b5aca375f729.tar.gz |
CI: add workflow_dispatch event to the main build
Invert the workflow conditionals so that a workflow_dispatch event acts
like an on: push build.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/main.yml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3d2102c21..7179a613d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,6 +7,7 @@ on: branches: [ main, maint/* ] pull_request: branches: [ main, maint/* ] + workflow_dispatch: env: docker-registry: docker.pkg.github.com @@ -48,7 +49,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - if: github.event_name == 'push' + if: github.event_name != 'pull_request' - name: Setup QEMU run: docker run --rm --privileged multiarch/qemu-user-static:register --reset if: matrix.container.qemu == true @@ -59,7 +60,7 @@ jobs: DOCKER_REGISTRY: ${{ env.docker-registry }} GITHUB_TOKEN: ${{ secrets.github_token }} working-directory: ${{ env.docker-config-path }} - if: github.event_name == 'push' + if: github.event_name != 'pull_request' - name: Build and publish image run: | if [ "${{ matrix.container.base }}" != "" ]; then @@ -68,7 +69,7 @@ jobs: docker build -t ${{ env.docker-registry-container-sha }} ${BASE_ARG} -f ${{ env.dockerfile }} . docker push ${{ env.docker-registry-container-sha }} working-directory: ${{ env.docker-config-path }} - if: github.event_name == 'push' && env.docker-container-exists != 'true' + if: github.event_name != 'pull_request' && env.docker-container-exists != 'true' # Run our CI/CD builds. We build a matrix with the various build targets # and their details. Then we build either in a docker container (Linux) @@ -292,4 +293,4 @@ jobs: path: api-documentation.zip - name: Push documentation branch run: git push origin gh-pages - if: github.event_name == 'push' && github.repository == 'libgit2/libgit2' + if: github.event_name != 'pull_request' && github.repository == 'libgit2/libgit2' |