forked from opensciencegrid/xrootd-cmstfc
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.46 KB
/
main.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
name: pipeline
on:
push
env:
BASE_TAG: user/xrootd-cmstfc:base
LATEST_TAG: ghcr.io/guyzsarun/xrootd-cmsjson:latest
jobs:
build-test:
strategy:
fail-fast: false
matrix:
version: ["centos:7", "almalinux:8", "almalinux:9"]
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
tags: ${{ env.BASE_TAG }}
build-args: |
IMAGE=${{ matrix.version }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Unit test
run: |
docker run --rm ${{ env.BASE_TAG }} python3 -m pytest -v
build-rpm:
needs: build-test
strategy:
fail-fast: false
matrix:
version: ["centos:7", "almalinux:8", "almalinux:9"]
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile.rpm
tags: ${{ env.BASE_TAG }}
build-args: |
IMAGE=${{ matrix.version }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max