From 72950e790b671db825303d334eefeab0ef788190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Can=20Bak=C4=B1r?= Date: Tue, 15 Apr 2025 15:20:20 +0300 Subject: [PATCH] update actions --- .github/workflows/auto-merge.yaml | 28 --------------------- .github/workflows/build-test.yml | 28 +++++++++++++-------- .github/workflows/compatibility-checks.yaml | 4 ++- .github/workflows/lint-test.yml | 26 ------------------- cmd/httpx/input.txt | 2 ++ 5 files changed, 23 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/auto-merge.yaml delete mode 100644 .github/workflows/lint-test.yml create mode 100644 cmd/httpx/input.txt diff --git a/.github/workflows/auto-merge.yaml b/.github/workflows/auto-merge.yaml deleted file mode 100644 index 0ff3098..0000000 --- a/.github/workflows/auto-merge.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: πŸ€– Auto Merge - -on: - pull_request_review: - types: [submitted] - workflow_run: - workflows: ["♾️ Compatibility Check"] - types: - - completed - -permissions: - pull-requests: write - issues: write - repository-projects: write - -jobs: - auto-merge: - runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.DEPENDABOT_PAT }} - - - uses: ahmadnassri/action-dependabot-auto-merge@v2 - with: - github-token: ${{ secrets.DEPENDABOT_PAT }} - target: all \ No newline at end of file diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 9d2dd0c..3b768a4 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -8,23 +8,31 @@ 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 + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v5 + with: + version: latest + args: --timeout 5m + working-directory: . + 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.21.x - - - name: Check out code - uses: actions/checkout@v3 - - - name: Build - run: go build . + - uses: actions/checkout@v4 + - uses: projectdiscovery/actions/setup/go@v1 + - run: go build . working-directory: cmd/httpx/ - name: Test diff --git a/.github/workflows/compatibility-checks.yaml b/.github/workflows/compatibility-checks.yaml index 3f21c52..bd02e2c 100644 --- a/.github/workflows/compatibility-checks.yaml +++ b/.github/workflows/compatibility-checks.yaml @@ -14,4 +14,6 @@ jobs: contents: write steps: - uses: actions/checkout@v4 - - uses: projectdiscovery/actions/setup/go/compatibility-checks@master + - uses: projectdiscovery/actions/setup/go/compat-checks@master + with: + go-version-file: 'v2/go.mod' diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml deleted file mode 100644 index d8fee0d..0000000 --- a/.github/workflows/lint-test.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: πŸ™πŸ» Lint Test - -on: - pull_request: - paths: - - '**.go' - - '**.mod' - workflow_dispatch: - -jobs: - lint: - name: Lint Test - runs-on: ubuntu-latest - steps: - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.21.x - - name: Checkout code - uses: actions/checkout@v3 - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v3.6.0 - with: - version: latest - args: --timeout 5m - working-directory: . diff --git a/cmd/httpx/input.txt b/cmd/httpx/input.txt new file mode 100644 index 0000000..991467e --- /dev/null +++ b/cmd/httpx/input.txt @@ -0,0 +1,2 @@ +http://example.org[23.215.0.133] +https://example.org[23.215.0.133] \ No newline at end of file