Site and gallery: the repo and the showcase catalog live on Gitea at git.zacharyzhang.com
CI / crate (push) Failing after 2s
CI / site (push) Successful in 30s
CI / platforms (ubuntu-24.04) (push) Failing after 1m48s
CI / platforms (macos-15-intel) (push) Canceled after 0s
CI / platforms (ubuntu-24.04-arm) (push) Canceled after 0s
CI / platforms (windows-11-arm) (push) Canceled after 0s
CI / platforms (windows-latest) (push) Failing after 15s
CI / crate (push) Failing after 2s
CI / site (push) Successful in 30s
CI / platforms (ubuntu-24.04) (push) Failing after 1m48s
CI / platforms (macos-15-intel) (push) Canceled after 0s
CI / platforms (ubuntu-24.04-arm) (push) Canceled after 0s
CI / platforms (windows-11-arm) (push) Canceled after 0s
CI / platforms (windows-latest) (push) Failing after 15s
Links, the header's Gitea mark, the catalog's archive download and the showcase pin workflow (Gitea's API and commit status) move off GitHub; pinned at 6973834, which restores TokenLedger.
This commit is contained in:
18 files changed
+45
-47
No files matched your search
@@ -1,6 +1,6 @@
|
||||
name: Showcase
|
||||
|
||||
# Moves the site's showcase pin to the catalog's main once its checks pass, then deploys.
|
||||
# Moves the site's showcase pin to the Gitea catalog's main once its checks pass, then deploys.
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/30 * * * *"
|
||||
@@ -32,28 +32,26 @@ jobs:
|
||||
persist-credentials: false
|
||||
- id: head
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
API: ${{ github.server_url }}/api/v1/repos/${{ env.CATALOG }}
|
||||
FORCE: ${{ inputs.deploy }}
|
||||
run: |
|
||||
head=$(gh api "repos/$CATALOG/commits/main" --jq .sha)
|
||||
head=$(curl -fsS "$API/branches/main" | jq -r .commit.id)
|
||||
pinned=$(tr -d '[:space:]' < frontend/showcase.lock)
|
||||
if [ "$head" = "$pinned" ]; then
|
||||
echo "showcase: pinned at ${head:0:7}, the catalog's main"
|
||||
[ "$FORCE" = "true" ] && echo "commit=$head" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
runs=$(gh api "repos/$CATALOG/commits/$head/check-runs" --jq '.check_runs')
|
||||
total=$(echo "$runs" | jq length)
|
||||
waiting=$(echo "$runs" | jq '[.[] | select(.status != "completed")] | length')
|
||||
failed=$(echo "$runs" | jq '[.[] | select(.status == "completed" and (.conclusion | IN("success", "skipped", "neutral") | not))] | length')
|
||||
if [ "$total" -eq 0 ] || [ "$waiting" -gt 0 ]; then
|
||||
status=$(curl -fsS "$API/commits/$head/status")
|
||||
total=$(echo "$status" | jq .total_count)
|
||||
state=$(echo "$status" | jq -r .state)
|
||||
if [ "$total" -eq 0 ] || [ "$state" = "pending" ]; then
|
||||
echo "showcase: ${head:0:7}'s checks have not finished; next run looks again"
|
||||
[ "$FORCE" = "true" ] && echo "commit=$pinned" >> "$GITHUB_OUTPUT"
|
||||
[ "$FORCE" = "true" ] && echo "commit=$pinned" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
if [ "$failed" -gt 0 ]; then
|
||||
echo "::error::showcase: ${head:0:7} failed its catalog checks; the pin stays at ${pinned:0:7}"
|
||||
if [ "$state" != "success" ]; then
|
||||
echo "::error::showcase: ${head:0:7} failed its catalog checks ($state); the pin stays at ${pinned:0:7}"
|
||||
exit 1
|
||||
fi
|
||||
echo "showcase: ${pinned:0:7} -> ${head:0:7}"
|
||||
@@ -84,11 +82,8 @@ jobs:
|
||||
with:
|
||||
tool: ${{ env.WASM_BINDGEN }}
|
||||
- name: wasm-opt
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release download -R WebAssembly/binaryen -p 'binaryen-*-x86_64-linux.tar.gz' -D "$RUNNER_TEMP"
|
||||
tar -xzf "$RUNNER_TEMP"/binaryen-*-x86_64-linux.tar.gz -C "$RUNNER_TEMP"
|
||||
curl -fsSL https://github.com/WebAssembly/binaryen/releases/download/version_132/binaryen-version_132-x86_64-linux.tar.gz | tar -xz -C "$RUNNER_TEMP"
|
||||
echo "$(ls -d "$RUNNER_TEMP"/binaryen-*/)bin" >> "$GITHUB_PATH"
|
||||
- uses: pnpm/action-setup@v6
|
||||
with:
|
||||
@@ -113,8 +108,8 @@ jobs:
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
|
||||
- name: Commit the pin
|
||||
run: |
|
||||
git config user.name 'github-actions[bot]'
|
||||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
||||
git config user.name 'gitea-actions'
|
||||
git config user.email 'actions@git.zacharyzhang.com'
|
||||
git add frontend/showcase.lock
|
||||
git diff --cached --quiet && exit 0
|
||||
git commit -m "Site · Showcase: pin Ely-GPUI-Showcases at ${COMMIT:0:7}"
|
||||
|
||||
Reference in new issue
Block a user