-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (104 loc) · 2.75 KB
/
integration.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Integration
concurrency:
group: integration_${{ github.ref_name }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
on:
pull_request:
push:
branches:
- main
permissions:
contents: write # This is required for actions/checkout and releases
id-token: write # This is required for requesting the JWT
pages: write # This is required for pages
pull-requests: read # This is required for paths-filter
jobs:
dependencies:
name: Update Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
uses: ./github/setup
lint:
name: Lint
needs:
- dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
id: setup
uses: ./github/setup
- name: Lint Go
if: steps.setup.outputs.change_go == 'true' || github.ref_name == 'main'
run: ./m lint-go
- name: Lint Hugo
if: steps.setup.outputs.change_hugo == 'true' || github.ref_name == 'main'
run: ./m lint-hugo
- name: Lint Shell
if: steps.setup.outputs.change_shell == 'true' || github.ref_name == 'main'
run: ./m lint-shell
test_go:
name: Test - Go
needs:
- dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
id: setup
uses: ./github/setup
- name: Test Go
if: steps.setup.outputs.change_go == 'true' || github.ref_name == 'main'
run: ./m test-go
release_branch:
env:
BUILD_SOURCE: main
if: github.ref_name == 'main'
name: Release - Branch
needs:
- lint
- test_go
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup
id: setup
uses: ./github/setup
with:
vault_address: ${{ github.ref_name == 'main' && secrets.VAULT_ADDR || '' }}
vault_role: ${{ github.ref_name == 'main' && 'yaml8n' || '' }}
- name: Create tag
run: |
./m tag
- name: Create release
run: |
./m tag-github-release
./m release
- name: Build hugo
run: ./m build-hugo
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'hugo/public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2