This repository has been archived by the owner on Jan 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (59 loc) · 2.42 KB
/
dependabot.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: auto-merge
on:
pull_request_target:
jobs:
auto-merge:
runs-on: ubuntu-20.04
if: ${{ github.actor == 'dependabot[bot]' && github.event.pull_request.head.repo.fork == false }}
permissions:
issues: write
pull-requests: write
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check if Dockerfile is building
uses: docker/build-push-action@v4
with:
context: .
push: false
tags: "waf-proxy"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test image
run: "make test IMAGE=waf-proxy"
- name: Scan image
uses: aquasecurity/[email protected]
with:
image-ref: "ghcr.io/riotkit-org/waf-proxy:${{ steps.tag.outputs.TAG }}"
format: 'table'
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Merge Pull Request
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Checkout back to main branch
uses: actions/checkout@v3
with:
ref: main
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
token: ${{ secrets.GH_RW_TOKEN }}