Skip to content

fix(notifications): clean up control flow and fix PR/Issue action confirmations #162

fix(notifications): clean up control flow and fix PR/Issue action confirmations

fix(notifications): clean up control flow and fix PR/Issue action confirmations #162

name: build and test
on:
pull_request:
paths-ignore:
- "docs/**"
permissions:
contents: read
jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: ./go.mod
- name: Download Go modules
run: go mod download
- name: Build
run: go build ./...
- name: Test
run: go test ./...
dependabot:
needs: [build-and-test]
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
steps:
- id: metadata
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: |
gh pr review --approve "$PR_URL"
gh pr merge --squash --auto "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}