-
Notifications
You must be signed in to change notification settings - Fork 6
59 lines (50 loc) · 1.61 KB
/
push.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
---
name: CI
on: push
jobs:
assure-unique-container:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/heads/')
name: assure unique »ubi-minimal« container in repository
steps:
- uses: actions/checkout@v3
name: Checkout code
- name: Check constraint
run: |
test 1 -eq $(grep --only-matching --no-filename 'ubi-minimal:[0-9][0-9.-]*' -R . | uniq | wc -l)
test-and-build:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/heads/')
strategy:
matrix:
go: [ '1.19', '1.20', '1.21' ]
container: registry.access.redhat.com/ubi8/ubi-minimal:8.8-1072.1697626218
name: Test and Build w/ Go v${{ matrix.go }}
needs: assure-unique-container
steps:
- name: Install prerequisites
run: microdnf install tar gzip findutils gcc make
- uses: actions/checkout@v3
name: Checkout code
- uses: actions/setup-go@v3
name: Install Go v${{ matrix.go }}
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: Handle Cache for Go Package(s)
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download/Install IBM MQ Redistributable
run: |
# https://developer.ibm.com/articles/mq-downloads/
mkdir /opt/mqm
curl -L https://ibm.biz/IBM-MQC-Redist-LinuxX64targz | tar xzf - -C /opt/mqm/
- name: Build
run: |
make