From c058e13ca9dc562c6c3252ae48d63b4316a95665 Mon Sep 17 00:00:00 2001 From: Dwi Siswanto Date: Wed, 30 Oct 2024 13:09:09 +0700 Subject: [PATCH] ci: bot misc Signed-off-by: Dwi Siswanto --- .../{dep-auto-merge.yml => auto-merge.yml} | 12 +++---- .github/workflows/build-test.yml | 4 +-- .github/workflows/codeql-analysis.yml | 31 +++++-------------- .github/workflows/compability-check.yaml | 19 ++++++++++++ .github/workflows/dockerhub-push.yml | 4 +-- .github/workflows/functional-test.yml | 6 ++-- .github/workflows/lint-test.yml | 4 +-- .github/workflows/performance-test.yaml | 7 ++--- .github/workflows/publish-docs.yaml | 3 +- .github/workflows/release-test.yml | 1 + .github/workflows/template-validate.yml | 3 +- 11 files changed, 48 insertions(+), 46 deletions(-) rename .github/workflows/{dep-auto-merge.yml => auto-merge.yml} (76%) create mode 100644 .github/workflows/compability-check.yaml diff --git a/.github/workflows/dep-auto-merge.yml b/.github/workflows/auto-merge.yml similarity index 76% rename from .github/workflows/dep-auto-merge.yml rename to .github/workflows/auto-merge.yml index 84b26e1fe7..0e39bd2c00 100644 --- a/.github/workflows/dep-auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -1,10 +1,10 @@ -name: πŸ€– dep auto merge +name: πŸ€– Auto Merge on: - pull_request: - branches: - - dev - workflow_dispatch: + workflow_run: + workflows: ["♾️ Compatibility Check"] + types: + - completed permissions: pull-requests: write @@ -12,7 +12,7 @@ permissions: repository-projects: write jobs: - automerge: + auto-merge: runs-on: ubuntu-latest if: github.actor == 'dependabot[bot]' steps: diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f4707b2baf..d3f52d37c4 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -8,8 +8,8 @@ on: workflow_dispatch: jobs: - build: - name: Test Builds + build-test: + if: "! endsWith(github.actor, '[bot]')" strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d41e7f4363..e9f60acd1c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -8,32 +8,17 @@ on: workflow_dispatch: jobs: - analyze: - name: Analyze + codeql-analysis: + if: "! endsWith(github.actor, '[bot]')" runs-on: ubuntu-latest-16-cores 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@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 \ No newline at end of file + - uses: actions/checkout@v4 + - uses: github/codeql-action/init@v2 + with: + languages: 'go' + - uses: github/codeql-action/autobuild@v2 + - uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.github/workflows/compability-check.yaml b/.github/workflows/compability-check.yaml new file mode 100644 index 0000000000..828fcc42a1 --- /dev/null +++ b/.github/workflows/compability-check.yaml @@ -0,0 +1,19 @@ +name: ♾️ Compatibility Check + +on: + pull_request: + types: [opened, synchronize] + branches: + - dev + +jobs: + check: + if: github.actor == 'dependabot[bot]' + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: projectdiscovery/actions/setup/go@v1 + - run: go mod download && go mod verify && go vet ./... diff --git a/.github/workflows/dockerhub-push.yml b/.github/workflows/dockerhub-push.yml index 46271626d9..7a07ae5c61 100644 --- a/.github/workflows/dockerhub-push.yml +++ b/.github/workflows/dockerhub-push.yml @@ -1,4 +1,4 @@ -name: πŸŒ₯ Docker Push +name: 🐳 Docker Push on: workflow_run: @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest-16-cores steps: - name: Git Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get GitHub tag id: meta diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index cfe8ab1465..002b2aa0ed 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -8,12 +8,12 @@ on: jobs: - functional: - name: Functional Test - runs-on: ${{ matrix.os }} + functional-test: + if: "! endsWith(github.actor, '[bot]')" strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] + runs-on: ${{ matrix.os }} steps: - name: Check out code uses: actions/checkout@v4 diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index cd8ceed9ca..185d785234 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -8,8 +8,8 @@ on: workflow_dispatch: jobs: - lint: - name: Lint Test + lint-test: + if: "! endsWith(github.actor, '[bot]')" runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/performance-test.yaml b/.github/workflows/performance-test.yaml index 92f5714bf4..210673a360 100644 --- a/.github/workflows/performance-test.yaml +++ b/.github/workflows/performance-test.yaml @@ -3,16 +3,13 @@ name: πŸ”¨ Performance Test on: workflow_dispatch: schedule: - # Weekly - - cron: '0 0 * * 0' + - cron: '0 0 * * 0' # Weekly jobs: - build: - name: Test Performance + perf-test: strategy: matrix: os: [ubuntu-latest, macOS-latest] - runs-on: ${{ matrix.os }} if: github.repository == 'projectdiscovery/nuclei' steps: diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml index 72adb4b0ad..92042fd883 100644 --- a/.github/workflows/publish-docs.yaml +++ b/.github/workflows/publish-docs.yaml @@ -7,7 +7,8 @@ on: workflow_dispatch: jobs: - docs: + publish-docs: + if: "! endsWith(github.actor, '[bot]')" runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index b4edbc728b..ce598a8d56 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -9,6 +9,7 @@ on: jobs: release-test: + if: "! endsWith(github.actor, '[bot]')" runs-on: ubuntu-latest-16-cores steps: - name: "Check out code" diff --git a/.github/workflows/template-validate.yml b/.github/workflows/template-validate.yml index 05279def57..5509d0257a 100644 --- a/.github/workflows/template-validate.yml +++ b/.github/workflows/template-validate.yml @@ -8,12 +8,11 @@ on: jobs: build: + if: "! endsWith(github.actor, '[bot]')" runs-on: ubuntu-latest-16-cores steps: - uses: actions/checkout@v4 - - uses: projectdiscovery/actions/setup/go@v1 - - name: Template Validation run: | go run . -ut