forked from shaftoe/pi-coding-agent-action
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (74 loc) · 2.52 KB
/
Copy pathdevelop.yml
File metadata and controls
87 lines (74 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Develop CI
# Single, fully-gated pipeline for every push to `develop`:
#
# validate + unit tests + coverage ─┐
# e2e tests ─┤ (all green?)
# fallow analysis ─┘ │
# ┌─────┴──────────────┐
# ▼ ▼
# rebuild dist (gated) update README deps (gated)
# commit + push commit + push
#
# Both `rebuild-dist` and `update-readme` only run once tests + e2e + fallow
# are green, so a broken `develop` never ships a new `dist/`. Commits use
# `[skip ci]` so they don't retrigger this workflow.
on:
push:
branches: [develop]
workflow_dispatch:
permissions:
id-token: write
contents: write
pull-requests: write
security-events: write
concurrency:
group: develop-pipeline
cancel-in-progress: false
jobs:
build-test-coverage:
name: Validate, test & e2e
uses: ./.github/workflows/build_test_coverage.yml
with:
e2e: true
secrets:
token: ${{ secrets.API_KEY }}
token_custom: ${{ secrets.API_KEY_CUSTOM }}
fallow:
name: Fallow analysis
uses: ./.github/workflows/fallow.yml
secrets: inherit
rebuild-dist:
name: Rebuild dist
needs: [build-test-coverage, fallow]
uses: ./.github/workflows/rebuild-dist.yml
secrets: inherit
update-readme:
name: Update README deps
needs: rebuild-dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Update dependency versions in README
run: bun run update-readme
- name: Check for changes
id: check
run: |
git add -f README.md
if git diff --cached --exit-code -- README.md; then
echo "changed=false" >> "$GITHUB_OUTPUT"
git reset -- README.md > /dev/null 2>&1 || true
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Commit and push
if: steps.check.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit --no-verify -m "chore: update README deps [skip ci]"
git pull --rebase origin develop --autostash
git push origin develop