Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
# -- 3. Render and publish the deploy artifact ----------------------------
publish-deploy-artifact:
needs: [resolve-image-lock]
uses: JorisJonkers-dev/github-workflows/.github/workflows/deploy-artifact.yml@ea7a9a1c52870c2ae3db08cd077d54dbef48aa3d # v0.14.0
uses: JorisJonkers-dev/github-workflows/.github/workflows/deploy-artifact.yml@5b5e93dc81846cac4e13118e7280fd81a143685e # v0.15.1
with:
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.tag) || github.ref }}
artifact-name: knowledge
Expand Down
13 changes: 12 additions & 1 deletion platform/render-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# NODE_AUTH_TOKEN) first: export GITHUB_TOKEN="$(gh auth token)".
set -euo pipefail

DEPLOY_CHECK_VERSION="0.15.0"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$REPO_ROOT"
Expand All @@ -45,6 +44,18 @@ value_from_workflows() {
| awk '{print $2}' | sort -u | head -1
}

# deploy-check ships from the same repository as the reusable workflows and is
# released with them, so the version comment on the deploy-validate pin is the
# version to run. Hardcoding it here is what let the previous copy rot.
DEPLOY_CHECK_VERSION="$(
grep -rhoE 'github-workflows/\.github/workflows/deploy-(validate|artifact)\.yml@[0-9a-f]{40} # v[0-9]+\.[0-9]+\.[0-9]+' \
.github/workflows/*.yml 2>/dev/null \
| grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+$' | tr -d v \
| sort -t. -k1,1n -k2,2n -k3,3n | tail -1
)"
[ -n "$DEPLOY_CHECK_VERSION" ] \
|| fail "no '# vX.Y.Z' comment on a deploy-validate/deploy-artifact pin in .github/workflows/*.yml"

SCHEMA_VERSION="$(value_from_workflows 'schema-version')"
CONTEXT_REF="$(value_from_workflows 'context-ref')"
[ -n "$SCHEMA_VERSION" ] || fail "no schema-version found in .github/workflows/*.yml"
Expand Down
Loading