-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (66 loc) · 2.68 KB
/
docker.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
name: Docker
on:
push:
branches:
- '**'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: release
variant: 'release'
plugins: 'go.lumeweb.com/portal-plugin-sync,go.lumeweb.com/portal-plugin-s5,go.lumeweb.com/portal-plugin-dashboard'
dev: 'false'
- name: release-dev
variant: 'debug'
plugins: 'go.lumeweb.com/portal-plugin-sync,go.lumeweb.com/portal-plugin-s5,go.lumeweb.com/portal-plugin-dashboard'
dev: 'true'
- name: minimal
variant: 'release'
plugins: ''
dev: 'false'
- name: dashboard
variant: 'release'
plugins: 'go.lumeweb.com/portal-plugin-dashboard'
dev: 'false'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
${{ github.ref_name }}-${{ matrix.name }}
${{ github.ref_name == 'master' && matrix.name == 'release' && 'latest' || '' }}
${{ github.ref_name == 'master' && matrix.name == 'release-dev' && 'latest-debug' || '' }}
${{ github.ref_name == 'master' && matrix.name == 'minimal' && 'latest-minimal' || '' }}
${{ github.ref_name == 'master' && matrix.name == 'dashboard' && 'latest-dashboard' || '' }}
${{ github.ref_name == 'develop' && matrix.name == 'release' && 'next' || '' }}
${{ github.ref_name == 'develop' && matrix.name == 'release-dev' && 'next-debug' || '' }}
${{ github.ref_name == 'develop' && matrix.name == 'minimal' && 'next-minimal' || '' }}
${{ github.ref_name == 'develop' && matrix.name == 'dashboard' && 'next-dashboard' || '' }}
labels: |
org.opencontainers.image.title=${{ github.repository }}
org.opencontainers.image.description=${{ github.repository }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
file: ${{ matrix.variant == 'debug' && 'Dockerfile.debug' || 'Dockerfile' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PLUGINS=${{ matrix.plugins }}
DEV=${{ matrix.dev }}