-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (52 loc) · 1.52 KB
/
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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_rpm:
name: Build RPM in Docker container
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
file: docker/build.dockerfile
push: false
load: true
tags: sle-prjmgr-tools-builder
- name: Build RPM inside Docker image
run: docker run --rm -v $PWD:/code sle-prjmgr-tools-builder
- name: Store built RPMs
uses: actions/upload-artifact@v3
with:
name: rpms
path: rpm-build/*.rpm
install_rpm:
name: Install previously built RPM
needs: build_rpm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: rpms
path: rpm-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
file: docker/install-check.dockerfile
push: false
load: true
tags: sle-prjmgr-tools-install-check
- name: Try installing the RPM in a openSUSE Tumbleweed image
run: docker run --rm -v $PWD/rpm-build:/rpms sle-prjmgr-tools-install-check