Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsandeep committed Aug 18, 2023
2 parents 46dc6d2 + be99396 commit 6c32c22
Show file tree
Hide file tree
Showing 30 changed files with 697 additions and 300 deletions.
47 changes: 24 additions & 23 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,39 @@
version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"

# Maintain dependencies for go modules
- package-ecosystem: "gomod"
directory: "v2/"
schedule:
interval: "daily"
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"
# # Maintain dependencies for docker
# - package-ecosystem: "docker"
# directory: "/"
# schedule:
# interval: "weekly"
# target-branch: "dev"
# commit-message:
# prefix: "chore"
# include: "scope"
# labels:
# - "Type: Maintenance"
#
# # Maintain dependencies for GitHub Actions
# - package-ecosystem: "github-actions"
# directory: "/"
# schedule:
# interval: "weekly"
# target-branch: "dev"
# commit-message:
# prefix: "chore"
# include: "scope"
# labels:
# - "Type: Maintenance"
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
authors:
- dependabot
categories:
- title: 🎉 New Features
labels:
- "Type: Enhancement"
- title: 🐞 Bugs Fixes
labels:
- "Type: Bug"
- title: 🔨 Maintenance
labels:
- "Type: Maintenance"
- title: Other Changes
labels:
- "*"
15 changes: 8 additions & 7 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20.x

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -30,7 +30,7 @@ jobs:
working-directory: v2/cmd/naabu/

- name: Test
run: go test ./...
run: go test -race ./...
working-directory: v2/

- name: Integration Tests
Expand All @@ -42,15 +42,16 @@ jobs:
- name: Race Condition Tests
run: |
go run -race . -host scanme.sh
sudo go run -race . -host scanme.sh
working-directory: v2/cmd/naabu/

build-mac:
runs-on: macos-13
runs-on: macos-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20.x

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -66,7 +67,7 @@ jobs:
working-directory: v2/cmd/naabu/

- name: Test
run: go test ./...
run: go test -race ./...
working-directory: v2/

- name: Integration Tests
Expand All @@ -87,7 +88,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20.x

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -97,7 +98,7 @@ jobs:
working-directory: v2/cmd/naabu/

- name: Test
run: go test ./...
run: go test -race ./...
working-directory: v2/

- name: Race Condition Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest-16-cores
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/dep-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🤖 dep auto merge

on:
pull_request:
branches:
- dev
workflow_dispatch:

permissions:
pull-requests: write
issues: write
repository-projects: write

jobs:
automerge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.DEPENDABOT_PAT }}

- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
github-token: ${{ secrets.DEPENDABOT_PAT }}
target: all
6 changes: 3 additions & 3 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest-16-cores] # Todo: windows-latest, macOS-latest
os: [ubuntu-latest] # Todo: windows-latest, macOS-latest

steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20.x

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -28,7 +28,7 @@ jobs:
run: |
sudo apt install libpcap-dev
sudo apt install nmap
go install github.com/projectdiscovery/simplehttpserver/cmd/simplehttpserver@latest
go install -race github.com/projectdiscovery/simplehttpserver/cmd/simplehttpserver@latest
- name: Run the simplehttpserver on 127.0.0.1:8000
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20.x

- name: Install Dependences
run: sudo apt install libpcap-dev

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
uses: golangci/golangci-lint-action@v3.6.0
with:
version: latest
args: --timeout 5m
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build-mac:
runs-on: macos-13
runs-on: macos-latest
steps:
- name: Code checkout
uses: actions/checkout@v3
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20.x
- name: Install Dependences
run: brew install libpcap
- name: Run GoReleaser
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20.x
- name: Install Dependences
run: sudo apt install libpcap-dev

Expand All @@ -65,7 +65,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: 🔨 Release Test

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

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

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

- name: Install Dependences
run: brew install libpcap

- name: release test
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean --snapshot -f .goreleaser/mac.yml"
version: latest
workdir: v2

release-test-linux:
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
with:
go-version: 1.20.x

- name: Install Dependences
run: sudo apt install libpcap-dev

- name: release test
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean --snapshot -f .goreleaser/linux.yml"
version: latest
workdir: v2

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

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

- name: release test
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean --snapshot -f .goreleaser/windows.yml"
version: latest
workdir: v2
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build
FROM golang:1.20.3-alpine AS builder
FROM golang:1.21.0-alpine AS builder
RUN apk add build-base libpcap-dev
WORKDIR /app
COPY . /app
Expand All @@ -8,7 +8,7 @@ RUN go mod download
RUN go build ./cmd/naabu

# Release
FROM alpine:3.17.3
FROM alpine:3.18.3
RUN apk add nmap libpcap-dev bind-tools ca-certificates nmap-scripts
COPY --from=builder /app/v2/naabu /usr/local/bin/
ENTRYPOINT ["naabu"]
Loading

0 comments on commit 6c32c22

Please sign in to comment.