-
Notifications
You must be signed in to change notification settings - Fork 31
98 lines (96 loc) · 3.25 KB
/
main.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
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
98
name: Publish ceph images
on:
push:
branches:
- main
paths:
- .github/workflows/main.yml
- docker/ceph/aws/aws-cli-configure.sh
- 'docker/ceph/**/Dockerfile'
- docker/ceph/rpm/set-ceph-repo.sh
pull_request:
branches:
- main
paths:
- .github/workflows/main.yml
- docker/ceph/aws/aws-cli-configure.sh
- 'docker/ceph/**/Dockerfile'
- docker/ceph/rpm/set-ceph-repo.sh
schedule:
- cron: '0 2 * * *'
jobs:
build-ceph-base:
runs-on: ubuntu-latest
strategy:
matrix:
os: [centos_stream8]
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
run: docker build -t docker.io/rhcsdashboard/ceph-base:${{ matrix.os }} -f docker/ceph/centos/Dockerfile ./docker/ceph
# - name: Google Chat Notification
# uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
# with:
# name: Build
# url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
# status: ${{ job.status }}
# if: failure()
- name: Push
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push docker.io/rhcsdashboard/ceph-base:${{ matrix.os }}
docker logout
build-ceph:
needs: build-ceph-base
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: [main, reef, quincy, pacific]
name: [ceph, ceph-rpm]
include:
- name: ceph
dir: ceph
- name: ceph-rpm
dir: ceph/rpm
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
run: docker build -t docker.io/rhcsdashboard/${{ matrix.name }}:${{ matrix.branch }} -f docker/${{ matrix.dir }}/${{ matrix.branch_dir}}/Dockerfile ./docker/ceph --build-arg CEPH_RELEASE=${{ matrix.branch }} --build-arg VCS_BRANCH=${{ matrix.branch }}
- name: Google Chat Notification
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: Build
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
if: failure()
- name: Push
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push docker.io/rhcsdashboard/${{ matrix.name }}:${{ matrix.branch }}
docker logout
build-ceph-e2e:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: [main, reef, quincy, pacific]
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
run: docker build -t docker.io/rhcsdashboard/ceph-e2e:${{ matrix.branch }} -f docker/ceph/e2e/Dockerfile ./docker/ceph --build-arg VCS_BRANCH=${{ matrix.branch }}
- name: Google Chat Notification
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: Build
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
if: failure()
- name: Push
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push docker.io/rhcsdashboard/ceph-e2e:${{ matrix.branch }}
docker logout