Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/auto-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 🔀 Auto merge PR

on:
workflow_run:
workflows: ["♾️ Compatibility Checks"]
types: [completed]

permissions:
contents: write
pull-requests: write

jobs:
auto-merge-dependabot:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: projectdiscovery/actions/pr/approve@v1
- uses: projectdiscovery/actions/pr/merge@v1
with:
auto: "true"
26 changes: 14 additions & 12 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@ on:
workflow_dispatch:

jobs:
lint:
name: Lint Test
if: ${{ !endsWith(github.actor, '[bot]') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/golangci-lint/v2@v1

build:
name: Test Builds
needs: [lint]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.24.x

- name: Check out code
uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/go@v1

- name: Build
run: go build .
working-directory: cmd/dnsx/

- name: Test
run: go test ./...
working-directory: .
env:
GH_ACTION: true
PDCP_API_KEY: "${{ secrets.PDCP_API_KEY }}"
Expand All @@ -40,9 +44,7 @@ jobs:
PDCP_API_KEY: "${{ secrets.PDCP_API_KEY }}"
run: bash run.sh
working-directory: integration_tests/

- name: Race Condition Tests
run: go run -race .
run: go build -race .
working-directory: cmd/dnsx/


22 changes: 6 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
pull_request:
paths:
- '**.go'
- '**.mod'
branches:
- dev

Expand All @@ -22,20 +21,11 @@ jobs:
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
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- uses: github/codeql-action/autobuild@v3
- uses: github/codeql-action/analyze@v3
19 changes: 19 additions & 0 deletions .github/workflows/compat-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ♾️ Compatibility Checks

on:
pull_request:
types: [opened, synchronize]
branches:
- dev

jobs:
check:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/go/compat-checks@v1
with:
go-version-file: 'go.mod'
26 changes: 0 additions & 26 deletions .github/workflows/dep-auto-merge.yml

This file was deleted.

18 changes: 6 additions & 12 deletions .github/workflows/dockerhub-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,24 @@ jobs:
docker:
runs-on: ubuntu-latest-16-cores
steps:
- name: Git Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get Github tag
id: meta
run: |
curl --silent "https://api.github.com/repos/projectdiscovery/dnsx/releases/latest" | jq -r .tag_name | xargs -I {} echo TAG={} >> $GITHUB_OUTPUT

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
- uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm
push: true
tags: projectdiscovery/dnsx:latest,projectdiscovery/dnsx:${{ steps.meta.outputs.TAG }}
tags: projectdiscovery/dnsx:latest,projectdiscovery/dnsx:${{ steps.meta.outputs.TAG }}
15 changes: 6 additions & 9 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@ name: 🧪 Functional Test

on:
pull_request:
paths:
- '**.go'
- '**.mod'
workflow_dispatch:


jobs:
jobs:
functional:
name: Functional Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.24.x

- name: Check out code
uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/go@v1

- name: Functional Tests
run: |
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/lint-test.yml

This file was deleted.

31 changes: 11 additions & 20 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,22 @@ name: 🎉 Release Binary
on:
push:
tags:
- v*
- '*'
workflow_dispatch:

jobs:
release:
jobs:
release:
runs-on: ubuntu-latest-16-cores
steps:
- name: "Check out code"
uses: actions/checkout@v3
with:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Set up Go"
uses: actions/setup-go@v4
with:
go-version: 1.24.x

- name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean"
version: latest
workdir: .
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/goreleaser@v1
with:
release: true
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
SLACK_WEBHOOK: "${{ secrets.RELEASE_SLACK_WEBHOOK }}"
DISCORD_WEBHOOK_ID: "${{ secrets.DISCORD_WEBHOOK_ID }}"
DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
20 changes: 4 additions & 16 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,14 @@ on:
paths:
- '**.go'
- '**.mod'
- '**.yml'
workflow_dispatch:

jobs:
release-test:
runs-on: ubuntu-latest-16-cores
steps:
- name: "Check out code"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
- uses: actions/checkout@v4
with:
go-version: 1.24.x

- name: release test
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean --snapshot"
version: latest
workdir: .
fetch-depth: 0
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/goreleaser@v1
40 changes: 40 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 💤 Stale

on:
schedule:
- cron: "0 0 * * 0" # Weekly

jobs:
stale:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
days-before-stale: 90
days-before-close: 7
stale-issue-label: "Status: Stale"
stale-pr-label: "Status: Stale"
stale-issue-message: >
This issue has been automatically marked as stale because it has not
had recent activity. It will be closed in 7 days if no further
activity occurs. Thank you for your contributions!
stale-pr-message: >
This pull request has been automatically marked as stale due to
inactivity. It will be closed in 7 days if no further activity
occurs. Please update if you wish to keep it open.
close-issue-message: >
This issue has been automatically closed due to inactivity. If you
think this is a mistake or would like to continue the discussion,
please comment or feel free to reopen it.
close-pr-message: >
This pull request has been automatically closed due to inactivity.
If you think this is a mistake or would like to continue working on
it, please comment or feel free to reopen it.
close-issue-label: "Status: Abandoned"
close-pr-label: "Status: Abandoned"
exempt-issue-labels: "Type: Enhancement"
Loading
Loading