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
20 changes: 15 additions & 5 deletions .github/actions/fleet-repin/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ inputs:
.github/workflows files onto a protected main, so it needs workflow scope
in addition to contents write.
required: true
cascade_repo:
description: >-
The repo that publishes the cascade CLI releases. The action installs the
dispatched rc from here, not from the example repo it runs in (the example
repos publish their own project releases, not the cascade binary).
required: false
default: 'stablekernel/cascade'

runs:
using: 'composite'
Expand All @@ -50,6 +57,7 @@ runs:
GH_TOKEN: ${{ inputs.token }}
REPIN_TOKEN: ${{ inputs.token }}
SELF_REPO: ${{ github.repository }}
CASCADE_REPO: ${{ inputs.cascade_repo }}
run: |
set -euo pipefail

Expand Down Expand Up @@ -82,13 +90,15 @@ runs:
# self-report comparison.
RC_BARE="${RC_VERSION#v}"

# 3. Install the dispatched rc CLI from THIS repo and assert it reports
# exactly the dispatched version BEFORE mutating anything. A bad or
# unpublished rc tag reds here, not deep inside a scenario.
# 3. Install the dispatched rc CLI from the cascade repo and assert it
# reports exactly the dispatched version BEFORE mutating anything. The
# binary is published by cascade_repo, not by the example repo this
# action runs in. A bad or unpublished rc tag reds here, not deep
# inside a scenario.
TMPDIR=$(mktemp -d)
echo "fleet-repin: downloading ${RC_VERSION} linux/amd64 archive from ${SELF_REPO}"
echo "fleet-repin: downloading ${RC_VERSION} linux/amd64 archive from ${CASCADE_REPO}"
gh release download "$RC_VERSION" \
--repo "$SELF_REPO" \
--repo "$CASCADE_REPO" \
--pattern '*linux_amd64*' \
--dir "$TMPDIR"
tar -xzf "$TMPDIR"/*.tar.gz -C "$TMPDIR"
Expand Down