forked from kubeagi/arcadia
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.77 KB
/
build_bff_sdk.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
name: BFF SDK Tests/Push
on:
push:
branches:
- 'main'
pull_request:
branches: [main]
workflow_dispatch:
inputs:
OnlyTestGeneratedSdk:
description: 'only test bff-sdk-generator, but not push'
required: true
default: 'true'
type: boolean
env:
GOPROXY: https://proxy.golang.org/,direct
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build-bff-sdk:
env:
GRL_SDK_TEST_ONLY: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: dorny/paths-filter@v2
id: gql-changes
with:
filters: |
gql:
- 'apiserver/graph/schema/*.gql'
- name: setting token to npmrc
if: (( github.event_name == 'push' && steps.gql-changes.outputs.gql == 'true') || github.event_name == 'workflow_dispatch')
run: |
echo '//registry.npmjs.org/:_authToken="${{ secrets.NPM_TOKEN }}"' >> ~/.npmrc
- name: Set variable on Merge pull request
if: github.event_name == 'push'
run: |
echo "GRL_SDK_TEST_ONLY=false" >> $GITHUB_ENV
- name: Set variable on workflow_dispatch
if: github.event_name == 'workflow_dispatch'
run: |
echo "GRL_SDK_TEST_ONLY=$TEST_ONLY" >> $GITHUB_ENV
env:
TEST_ONLY: ${{ inputs.OnlyTestGeneratedSdk }}
- name: make sdk
if: (steps.gql-changes.outputs.gql == 'true' || github.event_name == 'workflow_dispatch')
run: tests/build-bff-sdk.sh
env:
GRL_SDK_TEST_ONLY: ${{ env.GRL_SDK_TEST_ONLY }}