Skip to content

Commit

Permalink
gh actions fix
Browse files Browse the repository at this point in the history
Signed-off-by: James Nesbitt <[email protected]>
  • Loading branch information
james-nesbitt committed Dec 13, 2023
1 parent 6ec94eb commit cbb253a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 40 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Setup MCC gitub repo private access
run: git config --global url."https://${{ secrets.GH_MCC_USERNAME }}:${{ secrets.GH_MCC_ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/"
go-version: '>=1.21'

- name: Build
run: go build -v ./...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
pull-requests: write

steps:
- uses: actions/labeler@v4
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
22 changes: 7 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,21 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Setup MCC gitub repo private access
run: git config --global url."https://${{ secrets.GH_MCC_USERNAME }}:${{ secrets.GH_MCC_ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/"
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
-
name: Unshallow
- name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
-
name: Import GPG key
go-version: '1.21'
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
-
name: Run GoReleaser
- name: Run GoReleaser
uses: goreleaser/[email protected]
with:
version: latest
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
run: git config --global url."https://${{ secrets.GH_MCC_USERNAME }}:${{ secrets.GH_MCC_ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/"

- uses: actions/checkout@v4
- uses: actions/[email protected]
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
go-version: '1.21'
- run: go mod download
- run: go build -v .
- name: Run linters
Expand All @@ -48,10 +48,10 @@ jobs:
run: git config --global url."https://${{ secrets.GH_MCC_USERNAME }}:${{ secrets.GH_MCC_ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/"

- uses: actions/checkout@v4
- uses: actions/[email protected]
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
go-version: '1.21'
- run: go generate ./...
- name: git diff
run: |
Expand All @@ -71,17 +71,15 @@ jobs:
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '1.4.*'
- '1.6.*'
- '1.5.*'
steps:
- name: Setup MCC gitub repo private access
run: git config --global url."https://${{ secrets.GH_MCC_USERNAME }}:${{ secrets.GH_MCC_ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/"

- uses: actions/checkout@v4
- uses: actions/[email protected]
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/[email protected]
go-version: '1.21'
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tfsec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: tfsec
uses: aquasecurity/tfsec-pr-commenter-action@v1.2.0
uses: aquasecurity/tfsec-pr-commenter-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 2 additions & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Setup Terraform'
uses: hashicorp/[email protected]
with:
terraform_version: 1.0.3
uses: hashicorp/setup-terraform@v3
- name: Terraform Init
id: init
run: terraform init
- name: Terraform Validate
id: validate
run: terraform validate -no-color
run: terraform validate -no-color

0 comments on commit cbb253a

Please sign in to comment.