Skip to content

Commit 6260daa

Browse files
committed
chore(gh): update govc tests workflow
Updates the `govc` tests workflow: - Limits workflow permissions. - Removes superfluous quotes. - Pins actions to release commit hash. - Updates to Go 1.23 Signed-off-by: Ryan Johnson <[email protected]>
1 parent 060d9d0 commit 6260daa

File tree

1 file changed

+25
-36
lines changed

1 file changed

+25
-36
lines changed

.github/workflows/govmomi-govc-tests.yaml

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
1-
# Copyright (c) 2021 VMware, Inc. All Rights Reserved.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
1+
name: Tests (govc)
142

15-
name: govc Tests
3+
permissions:
4+
contents: read
5+
actions: read
166

177
on:
188
push:
19-
branches: ["main"]
20-
9+
branches: main
2110
pull_request:
22-
branches: ["main"]
11+
branches: main
2312

2413
concurrency:
2514
group: govmomi-govc-tests-${{ github.head_ref || github.run_id }}
@@ -31,9 +20,9 @@ jobs:
3120
strategy:
3221
fail-fast: false
3322
matrix:
34-
go-version: ["1.22"]
35-
platform: ["ubuntu-latest"]
36-
cmd: ["govc-test"]
23+
go-version: ["1.23"]
24+
platform: [ubuntu-latest]
25+
cmd: [govc-test]
3726
experimental: [false]
3827
timeout: [20]
3928

@@ -42,17 +31,17 @@ jobs:
4231
timeout-minutes: ${{ matrix.timeout }}
4332

4433
steps:
45-
- name: Check out code
46-
uses: actions/checkout@v4
34+
- name: Check Repository
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4736

48-
- name: Set up Go ${{ matrix.go-version }}
49-
uses: actions/setup-go@v5
37+
- name: Setup Go ${{ matrix.go-version }}
38+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
5039
with:
5140
go-version: ${{ matrix.go-version }}
5241
id: go
5342

54-
- name: Restore Go cache
55-
uses: actions/cache@v4
43+
- name: Restore Go Cache
44+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
5645
with:
5746
path: |
5847
~/.cache/go-build
@@ -65,30 +54,30 @@ jobs:
6554
run: |
6655
make ${{ matrix.cmd }}
6756
68-
- name: Debug with tmate on failure
57+
- name: Debug on Failure
6958
if: ${{ failure() }}
70-
uses: mxschmitt/action-tmate@v3
59+
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 # v3.19
7160

7261
govc-docs:
73-
name: Verify govc docs are up2date
62+
name: Verify Updated Docs
7463
strategy:
7564
matrix:
7665
go-version: ["1.22"]
77-
platform: ["ubuntu-latest"]
66+
platform: [ubuntu-latest]
7867
runs-on: ${{ matrix.platform }}
7968
timeout-minutes: 3
8069
steps:
81-
- name: Check out code
82-
uses: actions/checkout@v4
70+
- name: Check Repository
71+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8372

84-
- name: Set up Go ${{ matrix.go-version }}
85-
uses: actions/setup-go@v5
73+
- name: Setup Go ${{ matrix.go-version }}
74+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
8675
with:
8776
go-version: ${{ matrix.go-version }}
8877
id: go
8978

90-
- name: Restore Go cache
91-
uses: actions/cache@v4
79+
- name: Restore Go Cache
80+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
9281
with:
9382
path: |
9483
~/.cache/go-build

0 commit comments

Comments
 (0)