File tree Expand file tree Collapse file tree 5 files changed +17
-14
lines changed Expand file tree Collapse file tree 5 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,18 @@ jobs:
23
23
24
24
- uses : ' google-github-actions/setup-gcloud@v2' # ratchet:exclude
25
25
26
- - name : Delete services
26
+ - name : ' Delete services'
27
+ env :
28
+ PROJECT_ID : ' ${{ vars.PROJECT_ID }}'
27
29
run : |-
28
- gcloud config set core/project "${{ vars. PROJECT_ID } }"
30
+ gcloud config set core/project "${PROJECT_ID}"
29
31
gcloud config set functions/region "us-central1"
30
32
31
33
# List and delete all functions that were deployed 30 minutes ago or
32
34
# earlier. The date math here is a little weird, but we're looking for
33
35
# deployments "earlier than" 30 minutes ago, so it's less than since
34
36
# time increases.
35
- (IFS=$'\n'; for NAME in $(gcloud functions list --format=" value(name)" --filter=" updateTime < ' -pt30m'" ); do
37
+ (IFS=$'\n'; for NAME in $(gcloud functions list --format=' value(name)' --filter=' updateTime < " -pt30m"' ); do
36
38
echo "Deleting ${NAME}..."
37
- gcloud functions delete ${NAME} --quiet
39
+ gcloud functions delete " ${NAME}" --quiet
38
40
done)
Original file line number Diff line number Diff line change 27
27
28
28
- uses : ' actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
29
29
with :
30
- node-version : ' 20.x '
30
+ node-version-file : ' package.json '
31
31
32
32
- name : ' npm build'
33
33
run : ' npm ci && npm run build'
57
57
58
58
- uses : ' actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
59
59
with :
60
- node-version : ' 20.x '
60
+ node-version-file : ' package.json '
61
61
62
62
- name : ' npm build'
63
63
run : ' npm ci && npm run build'
Original file line number Diff line number Diff line change @@ -35,20 +35,15 @@ jobs:
35
35
36
36
- uses : ' actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4
37
37
with :
38
- node-version : ' 20.x '
38
+ node-version-file : ' package.json '
39
39
40
40
- name : ' npm build'
41
41
run : ' npm ci && npm run build'
42
42
43
- - name : ' npm lint'
44
- # There's no need to run the linter for each operating system, since it
45
- # will find the same thing 3x and clog up the PR review.
46
- if : ${{ matrix.os == 'ubuntu-latest' }}
47
- run : ' npm run lint'
48
-
49
43
- id : ' auth'
50
44
uses : ' google-github-actions/auth@v2' # ratchet:exclude
51
- if : ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
45
+ if : |-
46
+ ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
52
47
with :
53
48
project_id : ' ${{ vars.PROJECT_ID }}'
54
49
workload_identity_provider : ' ${{ vars.WIF_PROVIDER_NAME }}'
Original file line number Diff line number Diff line change @@ -16,4 +16,6 @@ set -eEuo pipefail
16
16
FILES=" $( node -e " process.stdout.write(require('node:fs').readdirSync('./', { recursive: true }).filter((e) => {return e.endsWith('.test.ts') && !e.startsWith('node_modules');}).sort().join(' '));" ) "
17
17
18
18
set -x
19
+
20
+ # shellcheck disable=SC2086
19
21
exec node --require ts-node/register --test-reporter spec --test ${FILES}
Original file line number Diff line number Diff line change 10
10
"format" : " eslint . --fix" ,
11
11
"test" : " bash ./bin/runTests.sh"
12
12
},
13
+ "engines" : {
14
+ "node" : " 20.x" ,
15
+ "npm" : " 10.x"
16
+ },
13
17
"repository" : {
14
18
"type" : " git" ,
15
19
"url" : " https://github.com/google-github-actions/deploy-cloud-functions"
You can’t perform that action at this time.
0 commit comments