diff --git a/.github/workflows/updatecli/updatecli.d/bump-latest-snapshot-version.yml b/.github/workflows/updatecli/updatecli.d/bump-latest-snapshot-version.yml index d4ca8b55c39..0943b8dab10 100644 --- a/.github/workflows/updatecli/updatecli.d/bump-latest-snapshot-version.yml +++ b/.github/workflows/updatecli/updatecli.d/bump-latest-snapshot-version.yml @@ -31,6 +31,16 @@ sources: spec: file: https://storage.googleapis.com/artifacts-api/snapshots/main.json key: .version + latestSnapshotMajorMinor: + name: Get latest snapshort major and minor + kind: json + spec: + file: https://storage.googleapis.com/artifacts-api/snapshots/main.json + key: .version + transformers: + - findsubmatch: + pattern: '(^\d+\.\d+)\.[^\s]+$' + captureindex: 1 targets: update-snapshot: @@ -42,3 +52,13 @@ targets: file: '.buildkite/pipeline.schedule-daily.yml' matchpattern: '(STACK_VERSION:) 8\.[^\s]*\.[^\s]*' replacepattern: '$1 {{ source "latestSnapshot" }}' + + update-snapshot-label: + name: '[updatecli] Update latest snapshot label step to {{ source "latestSnapshotMajorMinor" }}' + kind: file + sourceid: latestSnapshotMajorMinor + scmid: default + spec: + file: '.buildkite/pipeline.schedule-daily.yml' + matchpattern: '(Stack Version) v8\.\d+"' + replacepattern: 'Stack Version v{{ source "latestSnapshotMajorMinor" }}"'