Skip to content

Commit 2f44476

Browse files
authored
chore(xfer): update validate workflow (#613)
Update validate workflow. Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
1 parent 11cd1b2 commit 2f44476

1 file changed

Lines changed: 28 additions & 21 deletions

File tree

.github/workflows/go-validate.yml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
# Copyright (c) HashiCorp, Inc.
2-
# SPDX-License-Identifier: MPL-2.0
1+
---
2+
# This workflow runs basic linting and formatting checks.
33

4-
#
5-
# This GitHub action runs basic linting checks for Packer.
6-
#
7-
8-
name: "Go Validate"
4+
name: Go Validate
95

106
on:
117
push:
128
branches:
13-
- 'main'
9+
- main
1410
pull_request:
11+
branches:
12+
- main
1513

1614
permissions:
1715
contents: read
@@ -22,8 +20,9 @@ jobs:
2220
outputs:
2321
go-version: ${{ steps.get-go-version.outputs.go-version }}
2422
steps:
25-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26-
- name: 'Determine Go version'
23+
- name: Checkout Repository
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
- name: Get Go Version
2726
id: get-go-version
2827
run: |
2928
echo "Found Go $(cat .go-version)"
@@ -34,19 +33,23 @@ jobs:
3433
runs-on: ubuntu-latest
3534
name: Go Mod Tidy
3635
steps:
37-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38-
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
36+
- name: Checkout Repository
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
- name: Setup Go
39+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
3940
with:
4041
go-version: ${{ needs.get-go-version.outputs.go-version }}
4142
- run: go mod tidy
4243
check-lint:
4344
needs:
4445
- get-go-version
4546
runs-on: ubuntu-latest
46-
name: Lint check
47+
name: Lint Check
4748
steps:
48-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
49-
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
49+
- name: Checkout Repository
50+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
51+
- name: Setup Go
52+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
5053
with:
5154
go-version: ${{ needs.get-go-version.outputs.go-version }}
5255
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
@@ -57,10 +60,12 @@ jobs:
5760
needs:
5861
- get-go-version
5962
runs-on: ubuntu-latest
60-
name: Gofmt check
63+
name: Gofmt Check
6164
steps:
62-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
63-
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
65+
- name: Checkout Repository
66+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
67+
- name: Setup Go
68+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
6469
with:
6570
go-version: ${{ needs.get-go-version.outputs.go-version }}
6671
- run: |
@@ -75,10 +80,12 @@ jobs:
7580
needs:
7681
- get-go-version
7782
runs-on: ubuntu-latest
78-
name: Generate check
83+
name: Generate Check
7984
steps:
80-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
81-
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
85+
- name: Checkout Repository
86+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
87+
- name: Setup Go
88+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
8289
with:
8390
go-version: ${{ needs.get-go-version.outputs.go-version }}
8491
- run: |

0 commit comments

Comments
 (0)