-
Notifications
You must be signed in to change notification settings - Fork 46
56 lines (54 loc) · 1.77 KB
/
Copy pathgraphql.yaml
File metadata and controls
56 lines (54 loc) · 1.77 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
name: Build GraphQL Gateway
on:
push:
branches: ['develop']
paths:
- spellsource-graphql/**
- spellsource-server/src/main/resources/schema.graphqls
- build.gradle
- gradle/**
- buildSrc/**
- package.json
- yarn.lock
- .yarnrc.yml
- .github/workflows/graphql.yaml
workflow_dispatch:
jobs:
build-and-deploy-graphql:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs checkout
- name: Checkout public submodules
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
git submodule update --init vertx-jooq-fork spellsource-ts-proto/ts-proto
- uses: actions/setup-java@v4
with:
java-version: '24'
distribution: temurin
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build GraphQL gateway image
run: ./gradlew spellsource-graphql:createImage_spellsource_graphql_linux_amd64
- name: Tag and push GraphQL gateway image
shell: bash
run: |
VERSION=$(./gradlew properties -q | sed -n 's/^version: //p' | head -n 1)
SOURCE_IMAGE="spellsource/graphql:${VERSION}"
TARGET_IMAGE="ghcr.io/hiddenswitch/spellsource-graphql"
docker tag "${SOURCE_IMAGE}" "${TARGET_IMAGE}:${VERSION}"
docker tag "${SOURCE_IMAGE}" "${TARGET_IMAGE}:latest"
docker push "${TARGET_IMAGE}:${VERSION}"
docker push "${TARGET_IMAGE}:latest"