-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (102 loc) · 3.18 KB
/
default.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
97
98
99
100
101
102
name: Container Build
"on":
workflow_dispatch: null
push:
branches:
- 'main'
- 'dev'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'main'
- 'dev'
jobs:
build_all:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Git User Setup
shell: bash
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
- name: Helm - Setup
uses: azure/setup-helm@v3
- name: GitHub - Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Docker - Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'amd64,arm64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: GitHub - Login to Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker - Metadata - Alpine
id: alpine
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/daemondude23/abider/alpine
tags: |
type=ref,event=branch
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
type=semver,pattern=v{{version}}
- name: Docker = Metadata - Debian
id: debian
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/daemondude23/abider/debian
tags: |
type=ref,event=branch
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
type=semver,pattern=v{{version}}
- name: Docker - Build and Push - Alpine
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.alpine.outputs.tags }}
platforms: linux/amd64,linux/arm64
context: ./src/
file: ./src/Dockerfile-alpine
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Docker - Build and Push - Debian
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.debian.outputs.tags }}
platforms: linux/amd64,linux/arm64
context: ./src/
file: ./src/Dockerfile-debian
cache-from: type=gha
cache-to: type=gha,mode=max
- name: GitHub - Create Release (Draft)
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}/CHANGELOG.md
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Helm - Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: deploy/helm/charts/abider
config: deploy/helm/charts/abider/cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}