forked from Lan2Play/eventula-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (96 loc) · 3.3 KB
/
test_and_build.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
name: Test and Build
on:
push:
branches:
- master
- dev
paths-ignore:
- 'README.md'
- 'renovate.json'
- '.github/workflows/update-dockerhub.yml'
- '.github/workflows/website_build.yml'
- 'docs'
pull_request:
branches:
- master
- dev
- 'renovate/**'
- 'feature/**'
paths-ignore:
- 'README.md'
- 'renovate.json'
- '.github/workflows/update-dockerhub.yml'
- '.github/workflows/website_build.yml'
- 'docs'
workflow_dispatch: # Allows action to be run manually from the Actions tab
jobs:
build-docker:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: get dependencies
run: make composer-install-dev; make npm-install-gh
- name: make foldersctructure and layout images
run: make folder-structure-dev; make layout-images-dev
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Linux Image
if: ${{ github.event_name == 'pull_request' }}
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7
tags: |
lan2play/eventula-manager:latest
build-args: |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }})
BUILDID=${{ github.run_id }}
BUILDNUMBER=${{ github.run_number }}
SOURCE_COMMIT=${{ github.sha }}
SOURCE_REF=${{ github.ref }}
no-cache: true
push: false
- name: Build and push Linux Image
if: ${{ startsWith(github.ref, 'refs/heads/master') && github.event_name == 'push' }}
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7
tags: |
lan2play/eventula-manager:latest
build-args: |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }})
BUILDID=${{ github.run_id }}
BUILDNUMBER=${{ github.run_number }}
SOURCE_COMMIT=${{ github.sha }}
SOURCE_REF=${{ github.ref }}
no-cache: true
push: true
- name: Build and push Linux Image dev
if: ${{ startsWith(github.ref, 'refs/heads/dev') && github.event_name == 'push' }}
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7
tags: |
lan2play/eventula-manager:dev
build-args: |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }})
BUILDID=${{ github.run_id }}
BUILDNUMBER=${{ github.run_number }}
SOURCE_COMMIT=${{ github.sha }}
SOURCE_REF=${{ github.ref }}
no-cache: true
push: true