From b5af3fd258e6aa87e81a99d5ef0b7550de5337da Mon Sep 17 00:00:00 2001 From: Adrian Clay Lake Date: Fri, 11 Oct 2024 08:15:43 +0000 Subject: [PATCH] feat: added optional build identifier --- .github/workflows/Build-Rock.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Build-Rock.yaml b/.github/workflows/Build-Rock.yaml index 946a7db2..0091b868 100644 --- a/.github/workflows/Build-Rock.yaml +++ b/.github/workflows/Build-Rock.yaml @@ -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: @@ -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: @@ -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 @@ -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 @@ -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 @@ -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