Skip to content
Closed
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions .github/workflows/call-build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ on:
type: boolean
required: false
default: true
dockerfile:
description: The Dockerfile to use for building (relative to repo root).
type: string
required: false
default: ./dockerfiles/Dockerfile
secrets:
token:
description: The Github token or similar to authenticate with for the registry.
Expand Down Expand Up @@ -118,7 +123,7 @@ jobs:
uses: docker/build-push-action@v6
with:
# Use path context rather than Git context as we want local files
file: ./dockerfiles/Dockerfile
file: ${{ inputs.dockerfile }}
context: .
target: ${{ matrix.target }}
outputs: type=image,name=${{ inputs.registry }}/${{ inputs.image }},push-by-digest=true,name-canonical=true,push=${{ inputs.push }}
Expand Down Expand Up @@ -390,8 +395,8 @@ jobs:
fail-fast: true
matrix:
windows-base-version:
- '2022'
- '2025'
- "2022"
- "2025"
permissions:
contents: read
packages: write
Expand Down
35 changes: 22 additions & 13 deletions .github/workflows/staging-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy to staging
on:
push:
tags:
- '*'
- "*"

workflow_dispatch:
inputs:
Expand All @@ -27,7 +27,6 @@ on:
concurrency: staging-build-release

jobs:

# This job strips off the `v` at the start of any tag provided.
# It then provides this metadata for the other jobs to use.
staging-build-get-meta:
Expand All @@ -36,7 +35,6 @@ jobs:
outputs:
version: ${{ steps.formatted_version.outputs.replaced }}
steps:

- run: |
echo "Version: ${{ inputs.version || github.ref_name }}"
shell: bash
Expand All @@ -48,12 +46,12 @@ jobs:
- name: Get the version
id: get_version
run: |
VERSION="${INPUT_VERSION}"
if [ -z "${VERSION}" ]; then
echo "Defaulting to master"
VERSION=master
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
VERSION="${INPUT_VERSION}"
if [ -z "${VERSION}" ]; then
echo "Defaulting to master"
VERSION=master
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
env:
# Use the dispatch variable in preference, if empty use the context ref_name which should
Expand All @@ -64,21 +62,32 @@ jobs:
- uses: frabert/[email protected]
id: formatted_version
with:
pattern: '[v]*(.*)$'
pattern: "[v]*(.*)$"
string: "${{ steps.get_version.outputs.VERSION }}"
replace-with: '$1'
flags: 'g'
replace-with: "$1"
flags: "g"

staging-build-images:
needs: staging-build-get-meta
strategy:
matrix:
variant:
- name: standard
dockerfile: ./dockerfiles/Dockerfile
suffix: ""
- name: full
dockerfile: ./dockerfiles/Dockerfile.full
suffix: -full
name: Build ${{ matrix.variant.name }} images
uses: ./.github/workflows/call-build-images.yaml
with:
version: ${{ needs.staging-build-get-meta.outputs.version }}
version: ${{ needs.staging-build-get-meta.outputs.version }}${{ matrix.variant.suffix }}
ref: ${{ inputs.version || github.ref_name }}
registry: ghcr.io
username: ${{ github.actor }}
image: ${{ github.repository }}/staging
environment: staging
dockerfile: ${{ matrix.variant.dockerfile }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
cosign_private_key: ${{ secrets.COSIGN_PRIVATE_KEY }}
Expand Down
Loading
Loading