-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 967 Bytes
/
ci_app.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
name: Application CI
on:
pull_request:
paths:
- app/**
- '.github/workflows/ci_app.yml'
jobs:
app:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
version: 'latest'
project_id: 'chess-tactics-manager-ci'
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Get current Git commit SHA
id: vars
run: |
echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
- name: Run Cloud Build
run: |
gcloud builds submit --config app/cloudbuild.yaml .. --substitutions=_BRANCH=${{ env.BRANCH }},COMMIT_SHA=${{ env.COMMIT_SHA }}