-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (70 loc) · 2.26 KB
/
deploy-services.yml
File metadata and controls
82 lines (70 loc) · 2.26 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
name: Deploy Services to Fly.io
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: deploy-fly-${{ github.ref_name }}
cancel-in-progress: false
jobs:
secrets-preflight:
name: Verify deploy secrets
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check FLY_API_TOKEN
shell: bash
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: |
set -euo pipefail
if [[ -z "$FLY_API_TOKEN" ]]; then
echo "::error title=Missing FLY_API_TOKEN::mesh-lang deploy-services.yml now runs on push to main, but this repo has no FLY_API_TOKEN secret. GitHub Actions secrets are repo-scoped: copy FLY_API_TOKEN into mesh-lang or promote it to an org secret visible to mesh-lang."
exit 1
fi
deploy-registry:
name: Deploy mesh-registry
needs: secrets-preflight
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy registry to Fly.io
run: flyctl deploy --remote-only
working-directory: registry
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
deploy-packages-website:
name: Deploy mesh-packages website
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy packages website to Fly.io
run: flyctl deploy --remote-only
working-directory: packages-website
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
health-check:
name: Post-deploy health checks
needs: [deploy-registry, deploy-packages-website]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Verify public surface contract
shell: bash
timeout-minutes: 8
run: |
set -euo pipefail
python3 scripts/lib/m034_public_surface_contract.py public-http --root "$GITHUB_WORKSPACE" --artifact-dir "$RUNNER_TEMP/m034-public-surface-contract"