This repository has been archived by the owner on Oct 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (88 loc) · 2.77 KB
/
ci.yml
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
89
90
91
92
93
94
95
96
---
name: Continuous Integration
# yamllint disable-line rule:truthy
on:
# yamllint disable-line rule:empty-values
workflow_dispatch:
# yamllint disable-line rule:empty-values
pull_request:
push:
branches:
- "*"
tags-ignore:
- "**"
permissions: read-all
jobs:
##############################################################################
#
# Run on everything but Releases and WIP
#
##############################################################################
linting:
if: >-
!startsWith(github.event.head_commit.message, 'bump:') &&
!startsWith(github.event.head_commit.message, 'WIP')
name: "Run Linting against all files"
uses: jlec/github-actions/.github/workflows/reusable-linting.yml@main
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
go-build-test:
name: "GO Build & Test"
if: >-
${{ github.actor != 'dependabot[bot]' }} &&
!startsWith(github.event.head_commit.message, 'bump:') &&
!startsWith(github.event.head_commit.message, 'WIP')
needs:
- linting
uses: jlec/github-actions/.github/workflows/reusable-ci-go.yml@main
secrets:
pat: ${{ secrets.PAT_GITHUB_TOKEN }}
dependabot:
name: "Handle dependabot PR"
# trunk-ignore(actionlint/if-cond)
if: >-
${{ github.actor == 'dependabot[bot]' }} &&
!startsWith(github.event.head_commit.message, 'bump:') &&
!startsWith(github.event.head_commit.message, 'WIP')
needs:
- linting
uses: jlec/github-actions/.github/workflows/reusable-pr-dependabot.yml@main
permissions:
contents: write
pull-requests: write
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
ci-generic:
name: "Run generic CI"
# trunk-ignore(actionlint/if-cond)
if: >-
${{ github.actor != 'dependabot[bot]' }} &&
!startsWith(github.event.head_commit.message, 'bump:') &&
!startsWith(github.event.head_commit.message, 'WIP')
needs:
- go-build-test
- dependabot
- linting
uses: jlec/github-actions/.github/workflows/reusable-ci-generic.yml@main
permissions:
contents: write
pull-requests: write
secrets:
pat: ${{ secrets.PAT_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
ci-release:
name: "Run Release CI"
# trunk-ignore(actionlint/if-cond)
if: >-
${{ github.actor != 'dependabot[bot]' }} &&
!startsWith(github.event.head_commit.message, 'bump:') &&
!startsWith(github.event.head_commit.message, 'WIP')
needs:
- ci-generic
uses: jlec/github-actions/.github/workflows/reusable-ci-release.yml@main
permissions:
contents: write
pull-requests: write
secrets:
pat: ${{ secrets.PAT_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}