-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (50 loc) · 1.19 KB
/
main.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
name: main
on:
pull_request:
push:
branches:
- master
tags-ignore:
- '*'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup install stable
- run: make miltertest SUDO=sudo
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup install stable
- run: make lint SUDO=sudo
dry-run-release:
name: Dry-run release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Build docker image
run: make docker-image DOCKER_BUILD_ARGS="--load"
- name: Test built containers
run: make container-structure-test
tag:
name: Tag release
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
needs: [lint, test, dry-run-release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Tag release
run: |
TAG="v$(cat VERSION)"
git tag ${TAG}
git push origin ${TAG} || true