-
Notifications
You must be signed in to change notification settings - Fork 103
61 lines (58 loc) · 1.89 KB
/
docker-release.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
name: Docker-Release
on:
workflow_dispatch:
push:
paths-ignore: ['docs/**', '**/*.md', '**/*.drawio', '**/*.svg']
branches:
- master
env:
HUB: ghcr.io/flowerfine/scaleph
jobs:
release:
if: github.repository == 'flowerfine/scaleph'
strategy:
matrix:
image: [ scaleph-api, scaleph-ui-react, scaleph-file-fetcher, mysql ]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 360
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: amd64,arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build scaleph-dist
run: mvn -B -U -T 4 clean package -Pdist -DskipTests -Dfast
- name: Build scaleph-ui-react-dist
run: mvn -B -U package -pl scaleph-ui-react -am -DskipTests
- name: Build scaleph-ui-react
run: cd scaleph-ui-react && npm install && npm run build --prod
- name: Build scaleph-file-fetcher
run: mvn -B -U -T 4 clean package -Pdist -DskipTests -Dfast -am --projects scaleph-file-fetcher
- name: Push image
uses: docker/build-push-action@v4
with:
no-cache: false
push: true
context: .
platforms: linux/amd64,linux/arm64
file: tools/docker/build/${{ matrix.image }}/Dockerfile
tags: |
${{ env.HUB }}/${{ matrix.image }}:${{ github.sha }},
${{ env.HUB }}/${{ matrix.image }}:latest