-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.76 KB
/
merge-to-main.yaml
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
# Copyright David M. Johnson ([email protected]).
# Licensed under Apache Software License v2.
name: merge-to-main
# When there is a merge to main this workflow will build, test and check BlogQL's GraphQL schema.
# If that is successful, a docker build and push will occur.
# And finally, the GraphQL schema will be published.
on:
push:
branches: [ main ]
jobs:
build-test-server:
uses: "snoopdave/blogql/.github/workflows/wf-server-tests.yaml@main"
build-test-client:
needs: build-test-server
uses: "snoopdave/blogql/.github/workflows/wf-client-tests.yaml@main"
publish-stories:
needs: build-test-client
uses: "snoopdave/blogql/.github/workflows/wf-publish-stories.yaml@main"
secrets:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
publish-schema:
needs: publish-stories
uses: "snoopdave/blogql/.github/workflows/wf-publish-schema.yaml@main"
with:
schema-path: "schema.graphql"
working-dir: server
secrets:
APOLLO_KEY: ${{ secrets.APOLLO_KEY }}
APOLLO_GRAPH_REF: ${{ secrets.APOLLO_GRAPH_REF }}
docker-build-client:
needs: publish-schema
uses: "snoopdave/blogql/.github/workflows/wf-docker-build.yaml@main"
with:
dir: "{{defaultContext}}:client"
push: true
tags: "snoopdave/blogql-client"
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
docker-build-server:
needs: publish-schema
uses: "snoopdave/blogql/.github/workflows/wf-docker-build.yaml@main"
with:
dir: "{{defaultContext}}:server"
push: true
tags: "snoopdave/blogql-server"
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}