Skip to content

Commit

Permalink
Update trigger, inputs according to the review
Browse files Browse the repository at this point in the history
  • Loading branch information
palinatolmach committed Dec 13, 2024
1 parent 00fe46e commit aa2db22
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -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}
Expand Down

0 comments on commit aa2db22

Please sign in to comment.