Skip to content

Commit

Permalink
feat: added optional build identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-lake committed Oct 11, 2024
1 parent 95cbdf2 commit b5af3fd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/Build-Rock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: "Final filename of the rock OCI archive."
type: string
required: true
build-id-override:
description: "Optional identifier for managing job in GitHub UI. Defaults to oci-archive-name."
type: string
default: ""

# source parameters
rock-repo:
Expand Down Expand Up @@ -36,6 +40,7 @@ on:
env:
ROCK_REPO_DIR: rock-repo # path where the image repo is cloned into
ROCK_CI_FOLDER: ci-rocks # path of uploaded/downloaded artifacts
BUILD_ID: ${{ inputs.build-id-override || inputs.oci-archive-name }}

jobs:
configure-build:
Expand All @@ -46,7 +51,7 @@ jobs:
runner-build-matrix: ${{ steps.configure.outputs.runner-build-matrix }}
lpci-build-matrix: ${{ steps.configure.outputs.lpci-build-matrix }}
oci-factory-ref: ${{ steps.workflow-version.outputs.sha }}
name: "configure-build | ${{ inputs.oci-archive-name }}"
name: "configure-build | ${{ env.BUILD_ID }}"
steps:

- name: Get Workflow Version
Expand Down Expand Up @@ -98,7 +103,7 @@ jobs:
fail-fast: true
matrix: ${{ fromJSON(needs.configure-build.outputs.runner-build-matrix) }}
runs-on: ${{ matrix.runner }}
name: "runner-build | ${{ inputs.oci-archive-name }} | | ${{ matrix.architecture }} "
name: "runner-build - ${{ matrix.architecture }} | ${{ env.BUILD_ID }}"
steps:

- name: Cloning OCI Factory
Expand Down Expand Up @@ -147,7 +152,7 @@ jobs:
fail-fast: true
matrix: ${{ fromJSON(needs.configure-build.outputs.lpci-build-matrix) }}
runs-on: ubuntu-22.04
name: "lpci-build | ${{ inputs.oci-archive-name }} | ${{ matrix.architecture }} "
name: "lpci-build - ${{ matrix.architecture }} | ${{ env.BUILD_ID }}"
steps:

- name: Cloning OCI Factory
Expand Down Expand Up @@ -198,7 +203,7 @@ jobs:
# Always run even if one of the *-build jobs are skipped
# Nice example from benjamin-bergia/github-workflow-patterns...
if: ${{ always() && contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) }}
name: "assemble-rock | ${{ inputs.oci-archive-name }}"
name: "assemble-rock | ${{ env.BUILD_ID }}"
steps:
# Job Setup
- uses: actions/checkout@v4
Expand Down

0 comments on commit b5af3fd

Please sign in to comment.