From 20cafbb3d2dc1d6a2a20fd4e2fa38a7d06f34277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 21 Oct 2026 14:41:42 +0200 Subject: [PATCH] Allow triggering CI manually with workflow_dispatch Manual runs build, test and push images like push and schedule runs. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/workflow.yml | 3 ++- build-and-test.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9708ae8..be9ac70 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,6 +1,7 @@ name: Docker NodeJS Images GitHub workflow on: + workflow_dispatch: pull_request: branches: - 'master' @@ -65,7 +66,7 @@ jobs: - uses: actions/checkout@v1 - name: Login to DockerHub # Merge ~ push. - if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} + if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} diff --git a/build-and-test.sh b/build-and-test.sh index c083297..99cf24c 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -38,7 +38,7 @@ RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="wh echo "Tests passed with success" -if [[ "$EVENT_NAME" == "push" || "$EVENT_NAME" == "schedule" ]]; then +if [[ "$EVENT_NAME" == "push" || "$EVENT_NAME" == "schedule" || "$EVENT_NAME" == "workflow_dispatch" ]]; then docker buildx build --platform=linux/amd64,linux/arm64 --push -t thecodingmachine/nodejs:${TAG} -f Dockerfile.${VARIANT} . docker login ghcr.io --username ${GITHUB_ACTOR} --password ${GITHUB_TOKEN}