Chore - Code cleanup in workflows (#1768)

* Change file extension to .yml for consistency

* Move permissions for clarity and consistency

* Change compat-checks action from @master to @v1

The action should be pinned to a stable ref such as @v1, consistent with
the documentation and how other PD projects reference it.

* Fix indentations and whitespaces in workflows
This commit is contained in:
Pontus Lindblom
2026-03-24 02:26:08 +01:00
committed by GitHub
parent 4d9e07828b
commit e6ed1e1b72
6 changed files with 45 additions and 43 deletions
+16 -15
View File
@@ -7,14 +7,15 @@ on:
- '**.go'
- '**.mod'
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
@@ -23,17 +24,17 @@ jobs:
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Checkout repository
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
@@ -6,14 +6,15 @@ on:
branches:
- dev
permissions:
contents: write
jobs:
check:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go/compat-checks@master
- uses: projectdiscovery/actions/setup/go/compat-checks@v1
with:
go-version-file: go.mod
+21 -21
View File
@@ -5,31 +5,31 @@ before:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
- env:
- CGO_ENABLED=0
goos:
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
- goos: windows
goarch: 'arm'
ignore:
- goos: darwin
goarch: '386'
- goos: windows
goarch: 'arm'
binary: '{{ .ProjectName }}'
main: cmd/subfinder/main.go
binary: '{{ .ProjectName }}'
main: cmd/subfinder/main.go
archives:
- formats:
- zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}'
- formats:
- zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}'
checksum:
algorithm: sha256