Skip to content

Commit

Permalink
Fix github actions deprecations, gosec errors & go version 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
containerscrew committed May 6, 2024
1 parent 597a8f0 commit aabe9ad
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup-go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.21.5'
go-version: '1.22'
cache: false

- name: security
uses: securego/gosec@master
with:
args: -exclude=G104,G204 ./...
args: -exclude=G104,G204,G107 ./...

- name: lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v5
with:
version: latest

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Gitleaks
on:
pull_request:
push:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # run once a day at 4 AM
# workflow_dispatch:
# schedule:
# - cron: "0 4 * * *" # run once a day at 4 AM
jobs:
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: Release 📦
on:
push:
tags:
- '*'
branches:
- 'main'
- 'v*'

permissions:
contents: write
Expand All @@ -16,14 +14,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: setup-go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.21.5'
go-version: '1.22'

- name: Import GPG key
id: import_gpg
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ internal/utils/markdown_render/docs/
.DS_Store

# binary builds
tftools
tftools
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21.5
1.22
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ go-generate: ## Run go generate
go generate ./...

gosec: ## Run gosec
gosec -exclude=G104,G204 ./...
gosec -exclude=G104,G204,G107 ./...

update-dependencies: ## Update dependencies
go get -u ./...
Expand Down
2 changes: 2 additions & 0 deletions internal/utils/markdown_render/pretty_markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
)

func ReadUsageFile(version string) string {
// Always fetch usage.md of the version you are using, not from latest main branch
// Skip gosec G107, this ULR can't be a constant
usageURL := fmt.Sprintf("https://raw.githubusercontent.com/containerscrew/tftools/%s/docs/usage.md", version)

resp, err := http.Get(usageURL)
Expand Down
2 changes: 1 addition & 1 deletion scripts/tfsum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ else
fi

"$1" show -json plan.tfplan | tftools summarize --show-tags
if [ -f "plan.tfplan" ]; then rm plan.tfplan; fi
if [ -f "plan.tfplan" ]; then rm plan.tfplan; fi

0 comments on commit aabe9ad

Please sign in to comment.