Skip to content

Commit 07f6bf1

Browse files
authored
build(deps):upgrade deps in action for appengine storage flex and standard (GoogleCloudPlatform#2582)
* build(deps):upgrade deps in action for appengine storage flex and standard
1 parent bea4ea6 commit 07f6bf1

4 files changed

Lines changed: 46 additions & 29 deletions

File tree

.github/workflows/appengine-storage-flexible.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,17 @@ jobs:
2121
pull-requests: 'write'
2222
id-token: 'write'
2323
steps:
24-
- uses: 'google-github-actions/auth@v0.3.1'
24+
- uses: actions/checkout@v3
25+
with:
26+
ref: ${{github.event.pull_request.head.ref}}
27+
repository: ${{github.event.pull_request.head.repo.full_name}}
28+
- uses: 'google-github-actions/auth@v0.6.0'
2529
with:
2630
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
2731
service_account: 'kokoro-system-test@long-door-651.iam.gserviceaccount.com'
28-
create_credentials_file: 'true'
29-
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
32+
token_format: 'access_token'
3033
access_token_lifetime: 600s
31-
- uses: actions/checkout@v2
32-
with:
33-
ref: ${{github.event.pull_request.head.ref}}
34-
repository: ${{github.event.pull_request.head.repo.full_name}}
35-
- uses: actions/setup-node@v2
34+
- uses: actions/setup-node@v3
3635
with:
3736
node-version: 14
3837
- run: npm install
@@ -44,7 +43,7 @@ jobs:
4443
MOCHA_REPORTER_OUTPUT: appengine_storage_flexible_sponge_log.xml
4544
MOCHA_REPORTER: xunit
4645
- if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
47-
uses: actions/github-script@v5
46+
uses: actions/github-script@v6
4847
with:
4948
github-token: ${{ secrets.GITHUB_TOKEN }}
5049
script: |

.github/workflows/appengine-storage-standard.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@ jobs:
2121
pull-requests: 'write'
2222
id-token: 'write'
2323
steps:
24-
- uses: 'google-github-actions/auth@v0.3.1'
24+
- uses: actions/checkout@v3
25+
with:
26+
ref: ${{github.event.pull_request.head.ref}}
27+
repository: ${{github.event.pull_request.head.repo.full_name}}
28+
- uses: 'google-github-actions/auth@v0.6.0'
2529
with:
2630
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
2731
service_account: 'kokoro-system-test@long-door-651.iam.gserviceaccount.com'
28-
create_credentials_file: 'true'
29-
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
3032
access_token_lifetime: 600s
31-
- uses: actions/checkout@v2
32-
with:
33-
ref: ${{github.event.pull_request.head.ref}}
34-
repository: ${{github.event.pull_request.head.repo.full_name}}
3533
- uses: actions/setup-node@v2
3634
with:
3735
node-version: 14
@@ -44,7 +42,7 @@ jobs:
4442
MOCHA_REPORTER_OUTPUT: appengine_storage_standard_sponge_log.xml
4543
MOCHA_REPORTER: xunit
4644
- if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
47-
uses: actions/github-script@v5
45+
uses: actions/github-script@v6
4846
with:
4947
github-token: ${{ secrets.GITHUB_TOKEN }}
5048
script: |

appengine/storage/flexible/system-test/app.test.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
const path = require('path');
1717
const {Storage} = require('@google-cloud/storage');
18+
const supertest = require('supertest');
1819
const storage = new Storage();
1920
const assert = require('assert');
20-
const supertest = require('supertest');
2121
const proxyquire = require('proxyquire').noPreserveCache();
2222

2323
process.env.GCLOUD_STORAGE_BUCKET =
@@ -29,12 +29,22 @@ const cwd = path.join(__dirname, '../');
2929
const requestObj = supertest(proxyquire(path.join(cwd, 'app'), {process}));
3030

3131
before(async () => {
32-
await bucket.create(bucket).then(() => {
33-
return bucket.acl.add({
34-
entity: 'allUsers',
35-
role: Storage.acl.READER_ROLE,
32+
try {
33+
await bucket.create(bucket).then(() => {
34+
return bucket.acl.add({
35+
entity: 'allUsers',
36+
role: Storage.acl.READER_ROLE,
37+
});
3638
});
37-
});
39+
} catch (err) {
40+
if (
41+
!err.message.match(
42+
/Your previous request to create the named bucket succeeded and you already own it./
43+
)
44+
) {
45+
throw err;
46+
}
47+
}
3848
});
3949
after(async () => {
4050
try {

appengine/storage/standard/system-test/app.test.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
const path = require('path');
1717
const {Storage} = require('@google-cloud/storage');
1818
const storage = new Storage();
19-
const assert = require('assert');
2019
const supertest = require('supertest');
20+
const assert = require('assert');
2121
const proxyquire = require('proxyquire').noPreserveCache();
2222

2323
process.env.GCLOUD_STORAGE_BUCKET =
@@ -29,12 +29,22 @@ const cwd = path.join(__dirname, '../');
2929
const requestObj = supertest(proxyquire(path.join(cwd, 'app'), {process}));
3030

3131
before(async () => {
32-
await bucket.create(bucket).then(() => {
33-
return bucket.acl.add({
34-
entity: 'allUsers',
35-
role: Storage.acl.READER_ROLE,
32+
try {
33+
await bucket.create(bucket).then(() => {
34+
return bucket.acl.add({
35+
entity: 'allUsers',
36+
role: Storage.acl.READER_ROLE,
37+
});
3638
});
37-
});
39+
} catch (err) {
40+
if (
41+
!err.message.match(
42+
/Your previous request to create the named bucket succeeded and you already own it./
43+
)
44+
) {
45+
throw err;
46+
}
47+
}
3848
});
3949
after(async () => {
4050
try {

0 commit comments

Comments
 (0)