diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 5f48447a6..1ba58a087 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -1,11 +1,12 @@ --- name: 'Push Docker Image' on: - # TODO: remove, only for testing; replace with - # workflow_dispatch: - push: - branches: - - '**' # Trigger on every branch + workflow_dispatch: + + inputs: + kontrol_branch: + description: "Branch of Kontrol to use to build the Docker image" + required: true concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -19,14 +20,14 @@ jobs: - name: 'Check out code' uses: actions/checkout@v4 with: - ref: ${{ github.event.push.head.sha }} + ref: ${{ github.events.inputs.kontrol_branch}} fetch-depth: 0 - name: 'Set environment' run: | KONTROL_VERSION=$(cat package/version) echo "CONTAINER_NAME=kontrol-ci-docker-${GITHUB_SHA}" >> ${GITHUB_ENV} - BRANCH_NAME="${{ github.ref_name }}" + BRANCH_NAME="${{ github.events.inputs.kontrol_branch }}" SANITIZED_BRANCH_NAME=$(echo "${BRANCH_NAME}" | tr '/' '-' | tr -cd '[:alnum:]-_.') GHCR_TAG=ghcr.io/runtimeverification/kontrol/kontrol:ubuntu-jammy-${SANITIZED_BRANCH_NAME} echo "GHCR_TAG=${GHCR_TAG}" >> ${GITHUB_ENV}