diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 09ead44..03d9f60 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -8,8 +8,23 @@ 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: projectdiscovery/actions/golangci-lint/v2@v1 + with: + version: latest + args: --timeout 5m + working-directory: . + build: name: Test Builds + needs: [lint] runs-on: ${{ matrix.os }} strategy: matrix: diff --git a/.github/workflows/compat-checks.yaml b/.github/workflows/compat-checks.yaml new file mode 100644 index 0000000..a2641e7 --- /dev/null +++ b/.github/workflows/compat-checks.yaml @@ -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@master + with: + go-version-file: 'go.mod' diff --git a/.github/workflows/dep-auto-merge.yml b/.github/workflows/dep-auto-merge.yml index 84b26e1..0ff3098 100644 --- a/.github/workflows/dep-auto-merge.yml +++ b/.github/workflows/dep-auto-merge.yml @@ -1,10 +1,12 @@ -name: πŸ€– dep auto merge +name: πŸ€– Auto Merge on: - pull_request: - branches: - - dev - workflow_dispatch: + pull_request_review: + types: [submitted] + workflow_run: + workflows: ["♾️ Compatibility Check"] + types: + - completed permissions: pull-requests: write @@ -12,11 +14,11 @@ permissions: repository-projects: write jobs: - automerge: + auto-merge: runs-on: ubuntu-latest if: github.actor == 'dependabot[bot]' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.DEPENDABOT_PAT }} diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml deleted file mode 100644 index f7fb74b..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: . \ No newline at end of file