-
Notifications
You must be signed in to change notification settings - Fork 42
91 lines (78 loc) · 3.03 KB
/
master-build.yaml
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
name: Tornjak Artifact push
on:
push:
branches-ignore:
- 'dependabot/**'
workflow_dispatch: {}
jobs:
alpine-build:
runs-on: ubuntu-latest
steps:
- name: Show trigger info
run: |
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
# Workflow job info
- 🎉 The job was automatically triggered by a ${{ github.event_name }} event.
- 🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!
- 🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}.
EOF
- name: Check out repository code
uses: actions/[email protected]
- name: Log in to GHCR.io
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch name
id: branch_name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Compute Tornjak version
uses: ./.github/compute-version
id: version
- name: Run build
uses: ./.github/actions/build
with:
tag-version: ${{ contains(fromJSON('["main", "${{ steps.version.outputs.version }}"]'), steps.branch_name.outputs.branch) && true || false }}
- name: Print job result
run: |
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
- 🍏 This job's status is ${{ job.status }}.
EOF
ubi-build:
runs-on: ubuntu-latest
steps:
- name: Show trigger info
run: |
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
# Workflow job info
- 🎉 The job was automatically triggered by a ${{ github.event_name }} event.
- 🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!
- 🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}.
EOF
- name: Check out repository code
uses: actions/[email protected]
- name: Log in to GHCR.io
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch name
id: branch_name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Compute Tornjak version
uses: ./.github/compute-version
id: version
- name: Run build
uses: ./.github/actions/build
with:
image-tag-prefix: ubi-
backend-dockerfile: Dockerfile.backend-container.ubi
frontend-dockerfile: frontend/Dockerfile.frontend-container.ubi
tag-version: ${{ contains(fromJSON('["main", "${{ steps.version.outputs.version }}"]'), steps.branch_name.outputs.branch) && true || false }}
- name: Print job result
run: |
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
- 🍏 This job's status is ${{ job.status }}.
EOF