fix: use standard checkout and verify the pinned engine in Lyra CI
Verify Lyra CLI / verify (push) Failing after 5m5s
Verify Lyra CLI / verify (push) Failing after 5m5s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Lyra CLI workflows
|
||||
|
||||
[ci.yml](ci.yml) verifies this project on main pushes, pull requests and manual dispatch. It runs on ces-control, with a 60-minute timeout. Checkout and secret requirements are in [the parent README](../README.md).
|
||||
[ci.yml](ci.yml) verifies this project on main pushes, pull requests and manual dispatch. It runs on ces-control, with a 60-minute timeout. HTTPS checkout and job token details are in [the parent README](../README.md).
|
||||
|
||||
There is no production service deployment in this workflow.
|
||||
|
||||
+28
-29
@@ -13,44 +13,43 @@ jobs:
|
||||
env:
|
||||
DOCKER_BUILDKIT: "0"
|
||||
steps:
|
||||
- name: Checkout with codex-bot
|
||||
env:
|
||||
CODEX_BOT_SSH_KEY: ${{ secrets.CODEX_BOT_SSH_KEY }}
|
||||
GITEA_SSH_KNOWN_HOSTS: ${{ secrets.GITEA_SSH_KNOWN_HOSTS }}
|
||||
SOURCE_SHA: ${{ gitea.sha }}
|
||||
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
||||
- name: Checkout project
|
||||
id: checkout_project
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: ${{ gitea.server_url }}
|
||||
persist-credentials: false
|
||||
- name: Read pinned Aster revision
|
||||
id: aster_revision
|
||||
run: |
|
||||
set -eu
|
||||
test -n "$CODEX_BOT_SSH_KEY"
|
||||
test -n "$GITEA_SSH_KNOWN_HOSTS"
|
||||
case "$SOURCE_SHA" in *[!0-9a-f]*|'') exit 1;; esac
|
||||
test "${#SOURCE_SHA}" -eq 40
|
||||
umask 077
|
||||
checkout_keys=$(mktemp -d)
|
||||
trap 'rm -rf "$checkout_keys"' EXIT
|
||||
printf '%s\n' "$CODEX_BOT_SSH_KEY" > "$checkout_keys/key"
|
||||
printf '%s\n' "$GITEA_SSH_KNOWN_HOSTS" > "$checkout_keys/known_hosts"
|
||||
unset CODEX_BOT_SSH_KEY GITEA_SSH_KNOWN_HOSTS
|
||||
export GIT_SSH_COMMAND="ssh -F /dev/null -o IdentitiesOnly=yes -i $checkout_keys/key -p 22222 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$checkout_keys/known_hosts"
|
||||
git init .
|
||||
source_url="ssh://git@gitea.entroia.com:22222/$SOURCE_REPOSITORY.git"
|
||||
if git remote get-url origin >/dev/null 2>&1; then
|
||||
git remote set-url origin "$source_url"
|
||||
else
|
||||
git remote add origin "$source_url"
|
||||
fi
|
||||
git fetch --no-tags --depth=1 origin "$SOURCE_SHA"
|
||||
git checkout --detach --force FETCH_HEAD
|
||||
git submodule update --init --recursive
|
||||
aster_sha=$(git ls-tree HEAD -- vendor/aster | awk '$1 == "160000" && $2 == "commit" && $4 == "vendor/aster" { print $3 }')
|
||||
case "$aster_sha" in *[!0-9a-f]*|'') echo "Invalid Aster gitlink" >&2; exit 1;; esac
|
||||
test "${#aster_sha}" -eq 40
|
||||
printf 'sha=%s\n' "$aster_sha" >> "$GITHUB_OUTPUT"
|
||||
- name: Checkout pinned Aster
|
||||
id: checkout_aster
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: ${{ gitea.server_url }}
|
||||
repository: Zayden-Jung/endorphin-aster-vm
|
||||
ref: ${{ steps.aster_revision.outputs.sha }}
|
||||
path: vendor/aster
|
||||
persist-credentials: false
|
||||
- name: Verify Aster revision
|
||||
env:
|
||||
EXPECTED_ASTER_SHA: ${{ steps.aster_revision.outputs.sha }}
|
||||
run: test "$(git -C vendor/aster rev-parse HEAD)" = "$EXPECTED_ASTER_SHA"
|
||||
|
||||
- name: Verify CLI and record Endor output
|
||||
env:
|
||||
LYRA_RELEASE_SHA: ${{ gitea.sha }}
|
||||
run: sh scripts/ci-ces-control.sh
|
||||
- name: Show Endor output
|
||||
if: always()
|
||||
if: ${{ always() && steps.checkout_aster.outcome == 'success' }}
|
||||
run: cat ci-output/endor-examples.md
|
||||
- name: Upload Endor output
|
||||
if: always()
|
||||
if: ${{ always() && steps.checkout_aster.outcome == 'success' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: endor-execution-output-${{ gitea.sha }}
|
||||
|
||||
Reference in New Issue
Block a user