Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/_build-variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ jobs:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4

# Callers pass the raw Git ref/tag (e.g. `v1.1.2`, `v1.1.2a-pre.1`)
# or the literal `dev`. The leading `v` is a Git tag/GitHub release
# convention only — it must not leak into the Docker Hub tag or the
# in-container MADSCIENCELAB_VERSION banner, both of which follow
# this repo's pre-existing no-`v` version convention (e.g. `1.1.2a`).
- name: 'Compute image version (strip leading v)'
id: version
shell: bash
run: echo "value=${INPUT_VERSION#v}" >> "$GITHUB_OUTPUT"
env:
INPUT_VERSION: ${{ inputs.version }}

- name: 'Set up Ruby for generation tool'
uses: ruby/setup-ruby@v1
with:
Expand All @@ -102,7 +114,7 @@ jobs:

- name: 'Run file generation'
id: file-gen
run: bash build.sh ${{ inputs.dir_args }} --version ${{ inputs.version }}
run: bash build.sh ${{ inputs.dir_args }} --version ${{ steps.version.outputs.value }}

- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -139,11 +151,11 @@ jobs:
context: .
file: ${{ inputs.image_dir }}/docker/Dockerfile
build-args: |
CONTAINER_VERSION=${{ inputs.version }}
CONTAINER_VERSION=${{ steps.version.outputs.value }}
IMAGE_NAME=${{ inputs.image_name }}
push: ${{ inputs.push }}
tags: |
${{ env.IMAGE_URL }}:${{ inputs.version }}
${{ env.IMAGE_URL }}:${{ steps.version.outputs.value }}
${{ env.IMAGE_URL }}:latest
# Connect Docker driver to GitHub Action cache service
cache-from: type=gha
Expand Down
Loading