Skip to content

Commit 4c654a7

Browse files
authored
fix(ci): fix formatting and non-breaking spaces in iam-deny workflow (#4393)
* fix(ci): fix formatting and non-breaking spaces in iam-deny workflow * fix(ci): update actions/cache comment to match v4.2.4 hash
1 parent 779d4c7 commit 4c654a7

1 file changed

Lines changed: 50 additions & 40 deletions

File tree

.github/workflows/iam-deny.yaml

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
1615
name: iam-deny
1716
on:
1817
push:
1918
branches:
20-
- main
19+
- main
2120
paths:
22-
- 'iam/deny/**'
23-
- '.github/workflows/iam-deny.yaml'
21+
- 'iam/deny/**'
22+
- '.github/workflows/iam-deny.yaml'
2423
pull_request:
2524
types:
26-
- opened
27-
- reopened
28-
- synchronize
29-
- labeled
25+
- opened
26+
- reopened
27+
- synchronize
28+
- labeled
3029
paths:
31-
- 'iam/deny/**'
32-
- '.github/workflows/iam-deny.yaml'
30+
- 'iam/deny/**'
31+
- '.github/workflows/iam-deny.yaml'
3332
schedule:
34-
- cron: '0 0 * * 0'
33+
- cron: '0 0 * * 0'
34+
3535
jobs:
3636
test:
3737
permissions:
@@ -44,38 +44,48 @@ jobs:
4444
run:
4545
working-directory: 'iam/deny'
4646
steps:
47-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
48-
with:
49-
ref: ${{github.event.pull_request.head.sha}}
50-
- uses: 'google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093' # v3.0.0
51-
with:
52-
workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider'
53-
service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com'
54-
create_credentials_file: 'true'
55-
access_token_lifetime: 600s
56-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
57-
with:
47+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
48+
with:
49+
ref: ${{ github.event.pull_request.head.sha }}
50+
51+
- uses: 'google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093' # v3.0.0
52+
with:
53+
workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider'
54+
service_account: 'kokoro-ca@isakovf-iam-deny-samples.iam.gserviceaccount.com'
55+
create_credentials_file: 'true'
56+
access_token_lifetime: 600s
57+
58+
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
59+
with:
5860
node-version: 16
59-
- name: Get npm cache directory
60-
id: npm-cache-dir
61-
shell: bash
62-
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
63-
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
64-
id: npm-cache
65-
with:
61+
62+
- name: Get npm cache directory
63+
id: npm-cache-dir
64+
shell: bash
65+
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
66+
67+
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
68+
id: npm-cache
69+
with:
6670
path: ${{ steps.npm-cache-dir.outputs.dir }}
6771
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
68-
restore-keys: "${{ runner.os }}-node- \n"
69-
- name: install repo dependencies
70-
run: npm install
71-
working-directory: .
72-
- name: install directory dependencies
73-
run: npm install
74-
- run: npm run build --if-present
75-
- name: set env vars for scheduled run
76-
if: github.event.action == 'schedule'
77-
run: |
72+
restore-keys: |
73+
${{ runner.os }}-node-
74+
75+
- name: install repo dependencies
76+
run: npm install
77+
working-directory: .
78+
79+
- name: install directory dependencies
80+
run: npm install
81+
82+
- run: npm run build --if-present
83+
84+
- name: set env vars for scheduled run
85+
if: github.event.action == 'schedule'
86+
run: |
7887
echo "MOCHA_REPORTER_SUITENAME=iam-deny" >> $GITHUB_ENV
7988
echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
8089
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
81-
- run: npm test
90+
91+
- run: npm test

0 commit comments

Comments
 (0)