Commit 935f8513 by Edward Thomson

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.
parent a4218a07
......@@ -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'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment