Skip to content

Commit f100779

Browse files
committed
Add CI for release branches (#337)
1 parent faf00ca commit f100779

File tree

3 files changed

+72
-2
lines changed

3 files changed

+72
-2
lines changed

.github/workflows/integration.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: 'Integration'
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'release/**/*'
8+
pull_request:
9+
branches:
10+
- 'main'
11+
- 'release/**/*'
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
16+
cancel-in-progress: true
17+
18+
jobs:
19+
integration:
20+
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
21+
permissions:
22+
contents: 'read'
23+
id-token: 'write'
24+
runs-on: 'ubuntu-latest'
25+
26+
steps:
27+
- uses: 'actions/checkout@v4'
28+
29+
- uses: 'actions/setup-node@v4'
30+
with:
31+
node-version: '20.x'
32+
33+
- name: 'npm build'
34+
run: 'npm ci && npm run build'
35+
36+
- uses: 'google-github-actions/auth@main'
37+
with:
38+
workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}'
39+
service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
40+
41+
- name: 'Update app.yaml'
42+
run: |-
43+
echo "service: ${{ github.job }}-${{ github.run_number }}" >> ${{ github.workspace }}/example-app/app.yaml
44+
45+
- name: 'Deploy'
46+
id: 'deploy'
47+
uses: './'
48+
with:
49+
working_directory: '${{ github.workspace }}/example-app'
50+
build_env_vars: |-
51+
FOO=bar
52+
ZIP=zap
53+
env_vars: |-
54+
FOO=bar
55+
ZIP=zap
56+
57+
- name: 'Verify deployment'
58+
run: |-
59+
curl '${{ steps.deploy.outputs.url }}' \
60+
--silent \
61+
--fail \
62+
--location \
63+
--retry 5 \
64+
--retry-connrefused \
65+
--retry-delay 5 \
66+
--retry-max-time 300

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- 'main'
7+
- 'release/**/*'
78

89
jobs:
910
release:

.github/workflows/unit.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ name: 'unit'
33
on:
44
push:
55
branches:
6-
- 'main'
6+
- 'main'
7+
- 'release/**/*'
78
pull_request:
89
branches:
9-
- 'main'
10+
- 'main'
11+
- 'release/**/*'
12+
workflow_dispatch:
1013

1114
concurrency:
1215
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'

0 commit comments

Comments
 (0)