mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 01:15:27 +00:00
Workflow improvements
This commit is contained in:
parent
ed4e935951
commit
ff4a855bc8
@ -1,13 +1,12 @@
|
|||||||
name: Build
|
name: 🙏🏻 Build Test
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: golangci-lint
|
name: Lint Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -15,13 +14,12 @@ jobs:
|
|||||||
- name: Run golangci-lint
|
- name: Run golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
|
||||||
version: latest
|
version: latest
|
||||||
args: --timeout 5m
|
args: --timeout 5m
|
||||||
working-directory: v2/
|
working-directory: v2/
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Test Builds
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
36
.github/workflows/codeql-analysis.yml
vendored
Normal file
36
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: 🚨 CodeQL Analysis
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'go' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
33
.github/workflows/dockerhub-push.yml
vendored
33
.github/workflows/dockerhub-push.yml
vendored
@ -1,17 +1,34 @@
|
|||||||
name: ◎ Docker Push
|
name: 🌥 Docker Push
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
-
|
||||||
- name: Publish to Dockerhub Registry
|
name: Checkout
|
||||||
uses: dawidd6/action-docker-publish-changed@v3
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
-
|
||||||
|
name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
name: projectdiscovery/nuclei
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{secrets.DOCKER_PASSWORD}}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm
|
platforms: linux/amd64,linux/arm64,linux/arm
|
||||||
tag: latest
|
push: true
|
||||||
|
tags: projectdiscovery/nuclei:latest
|
||||||
@ -1,8 +1,9 @@
|
|||||||
name: Release
|
name: 🎉 Release Binary
|
||||||
on:
|
on:
|
||||||
create:
|
create:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@ -17,7 +18,7 @@ jobs:
|
|||||||
name: "Set up Go"
|
name: "Set up Go"
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.16
|
||||||
-
|
-
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
@ -27,4 +28,3 @@ jobs:
|
|||||||
args: "release --rm-dist"
|
args: "release --rm-dist"
|
||||||
version: latest
|
version: latest
|
||||||
workdir: v2/
|
workdir: v2/
|
||||||
|
|
||||||
@ -3,11 +3,11 @@ before:
|
|||||||
- go mod tidy
|
- go mod tidy
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- binary: nuclei
|
- env:
|
||||||
main: cmd/nuclei/main.go
|
- CGO_ENABLED=0
|
||||||
goos:
|
goos:
|
||||||
- linux
|
|
||||||
- windows
|
- windows
|
||||||
|
- linux
|
||||||
- darwin
|
- darwin
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
@ -15,11 +15,17 @@ builds:
|
|||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
|
|
||||||
|
ignore:
|
||||||
|
- goos: darwin
|
||||||
|
goarch: '386'
|
||||||
|
|
||||||
|
binary: '{{ .ProjectName }}'
|
||||||
|
main: cmd/nuclei/main.go
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- id: tgz
|
- format: zip
|
||||||
format: tar.gz
|
|
||||||
replacements:
|
replacements:
|
||||||
darwin: macOS
|
darwin: macOS
|
||||||
format_overrides:
|
|
||||||
- goos: windows
|
checksum:
|
||||||
format: zip
|
algorithm: sha256
|
||||||
Loading…
x
Reference in New Issue
Block a user