forked from camptocamp/pingdom-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (74 loc) · 1.82 KB
/
ci.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
name: ci
permissions: read-all
on:
pull_request:
jobs:
super-linter:
permissions:
statuses: write
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter/slim@v7
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_SHELL_SHFMT: false
VALIDATE_YAML_PRETTIER: false
go-lint:
name: go-lint
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
go-test:
name: go test
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: go test
run: make test
docker-build:
needs:
- go-lint
- go-test
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
id: docker_build
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: false
dependabot-auto-merge:
needs:
- docker-build
- super-linter
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-24.04
if: github.actor == 'dependabot[bot]'
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}