-
Notifications
You must be signed in to change notification settings - Fork 16
103 lines (85 loc) · 3.15 KB
/
merge-to-main.yml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: merge-to-main
on:
push:
branches: [ "main" ]
workflow_dispatch:
env:
APOLLO_KEY: ${{ secrets.APOLLO_KEY }}
APOLLO_VCS_COMMIT: ${{ github.event.pull_request.head.sha }}
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
deploy-monolith:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to fly
run: flyctl deploy --remote-only
publish-schemas:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: apollosolutions/rover-actions/install-rover-cli@v1
- name: Publish checkout schema
uses: apollosolutions/rover-actions/subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ vars.APOLLO_GRAPH_REF }}
name: checkout
schema: ./subgraphs/checkout/schema.graphql
- name: Publish discovery schema
uses: apollosolutions/rover-actions/subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ vars.APOLLO_GRAPH_REF }}
name: discovery
schema: ./subgraphs/discovery/schema.graphql
- name: Publish inventory schema
uses: apollosolutions/rover-actions/subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ vars.APOLLO_GRAPH_REF }}
name: inventory
schema: ./subgraphs/inventory/schema.graphql
- name: Publish orders schema
uses: apollosolutions/rover-actions/subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ vars.APOLLO_GRAPH_REF }}
name: orders
schema: ./subgraphs/orders/schema.graphql
- name: Publish products schema
uses: apollosolutions/rover-actions/subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ vars.APOLLO_GRAPH_REF }}
name: products
schema: ./subgraphs/products/schema.graphql
- name: Publish reviews schema
uses: apollosolutions/rover-actions/subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ vars.APOLLO_GRAPH_REF }}
name: reviews
schema: ./subgraphs/reviews/schema.graphql
- name: Publish shipping schema
uses: apollosolutions/rover-actions/subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ vars.APOLLO_GRAPH_REF }}
name: shipping
schema: ./subgraphs/shipping/schema.graphql
- name: Publish users schema
uses: apollosolutions/rover-actions/subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ vars.APOLLO_GRAPH_REF }}
name: users
schema: ./subgraphs/users/schema.graphql
publish-README:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: apollosolutions/rover-actions/install-rover-cli@v1
- name: Publish README
run: rover readme publish ${{ vars.APOLLO_GRAPH_REF }} --file README.md