aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/dependabot.yml
blob: c2539f62932ea4792161012d644709447fad72b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Fix dependabot imports

on:
  pull_request:
    types: [opened, synchronize]

permissions:
  pull-requests: write
  contents: write

jobs:
  run-custom-command:
    if: ${{ github.actor == 'dependabot[bot]' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.pull_request.head.ref }}
          repository: ${{ github.event.pull_request.head.repo.full_name }}
          submodules: true
      # TODO: Add any needed steps to be able to run your command
      # (e.g. actions/setup-node@2)
      - uses: actions/setup-go@v4
        with:
          go-version: "1.21"
          check-latest: true
      - name: Bump Go mod
        run: ./bumperate.sh
      - uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: Bump Go mod SRI
          commit_user_name: Mimi
          commit_user_email: mimi@xeserv.us
          commit_author: Mimi <mimi@xeserv.us>
      - name: Enable Pull Request Automerge
        run: gh pr merge --merge --auto ${{ github.event.number }}
        env:
          GH_TOKEN: ${{ github.token }}