-
Notifications
You must be signed in to change notification settings - Fork 10
97 lines (80 loc) · 2.58 KB
/
pr-buildutils.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
92
93
94
95
96
97
#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
name: Buildutils PR Build
on:
workflow_call:
inputs:
changed:
description: 'True if this module has been changed and should be rebuilt'
required: true
type: string
env:
BRANCH: ${{ github.event.number }}
jobs:
log-unchanged:
name: Buildutils is unchanged
if: ${{ inputs.changed == 'false' }}
runs-on: ubuntu-latest
steps:
- name: Log this module is unchanged
run: |
echo "The buildutils module is unchanged"
build-upload-galasabld:
name: Build galasabld
if: ${{ inputs.changed == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: |
modules/buildutils
- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build galasabld using the Makefile
working-directory: modules/buildutils
run: |
make all
- name: Build and test galasabld image
working-directory: modules/buildutils
run: |
docker build -t galasabld:${{ env.BRANCH }} --build-arg platform=linux-amd64 -f dockerfiles/galasabld/dockerfile.galasabld .
docker run --rm galasabld:${{ env.BRANCH }}
- name: Upload galasabld executables
uses: actions/upload-artifact@v4
with:
name: galasabld
path: modules/buildutils/bin
build-upload-openapi2beans:
name: Build openapi2beans
if: ${{ inputs.changed == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: |
modules/buildutils
- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build and test openapi2beans using the Makefile
working-directory: modules/buildutils
run: |
make all -C openapi2beans
- name: Build and test openapi2beans image
working-directory: modules/buildutils
run: |
docker build -t openapi2beans:${{ env.BRANCH }} --build-arg platform=linux-x86_64 -f dockerfiles/openapi2beans/dockerfile.openapi2beans .
docker run --rm openapi2beans:${{ env.BRANCH }}
- name: Upload openapi2beans executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans
path: modules/buildutils/openapi2beans/bin