-
-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (43 loc) · 1.58 KB
/
Copy pathdependabot.yml
File metadata and controls
49 lines (43 loc) · 1.58 KB
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
39
40
41
42
43
44
45
46
47
48
49
name: dependabot
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
botocore:
runs-on: ubuntu-latest
container: ghcr.io/carapace-sh/go:1.25.4
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'carapace-sh/carapace-aws'
steps:
- name: shallow clone
uses: actions/checkout@v6
if: "!startsWith(github.ref, 'refs/tags/')"
- name: fix git safe.directory
run: git config --global --add safe.directory '*'
# TODO clear old yaml files (in the code)
- name: generate
run: go generate ./...
- name: push
run: |
if [ ! -z "$(git status --porcelain)" ]; then
git config user.name rsteube-bot
git config user.email rsteube-bot@users.noreply.github.com
git add -A
git commit -m "updated botocore"
git push https://rsteube-bot:${GITHUB_TOKEN}@github.com/carapace-sh/carapace-aws.git HEAD:${GITHUB_HEAD_REF}
fi
# auto-merge:
# runs-on: ubuntu-latest
# if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'carapace-sh/carapace-aws'
# needs: botocore
# steps:
# - name: approve
# run: gh pr review --approve "$PR_URL"
# env:
# PR_URL: ${{github.event.pull_request.html_url}}
# GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# - name: merge
# run: gh pr merge --auto --merge "$PR_URL"
# env:
# PR_URL: ${{github.event.pull_request.html_url}}
# GH_TOKEN: ${{secrets.DEPENDABOT_TOKEN}}