-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (136 loc) · 3.88 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Release Containerimage
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-maven:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 3.8.6-openjdk-11
- 3.6.3-openjdk-11
- 3.8.2-openjdk-11
- 3.8.6-openjdk-18
- 3.8.6-openjdk-8
- 3.8.6-amazoncorretto-17
steps:
- uses: actions/checkout@v4
name: checkout
- uses: mr-smithers-excellent/docker-build-push@v6
name: push-container-image
with:
image: maven
registry: ghcr.io
username: ${{ github.repository }}
password: ${{ secrets.GHCR_TOKEN }}
dockerfile: maven/Containerfile
directory: maven
buildArgs: VERSION=${{ matrix.version }}
addLatest: true
tags: ${{ matrix.version }}
build-gradle:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 8.5-jdk11-alpine
steps:
- uses: actions/checkout@v4
name: checkout
- uses: mr-smithers-excellent/docker-build-push@v6
name: push-container-image
with:
image: gradle
registry: ghcr.io
username: ${{ github.repository }}
password: ${{ secrets.GHCR_TOKEN }}
dockerfile: gradle/Containerfile
directory: gradle
buildArgs: VERSION=${{ matrix.version }}
addLatest: true
tags: ${{ matrix.version }}
build-buildah:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- v1.29
steps:
- uses: actions/checkout@v4
name: checkout
- uses: mr-smithers-excellent/docker-build-push@v6
name: push-container-image
with:
image: buildah
registry: ghcr.io
username: ${{ github.repository }}
password: ${{ secrets.GHCR_TOKEN }}
dockerfile: buildah/Containerfile
directory: buildah
buildArgs: VERSION=${{ matrix.version }}
addLatest: true
tags: ${{ matrix.version }}
build-kubectl-oc:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 4.10
- 4.11
- 4.12
- 4.13
steps:
- uses: actions/checkout@v4
name: checkout
- uses: mr-smithers-excellent/docker-build-push@v6
name: build-openshift-latest
with:
image: kubectl-oc
registry: ghcr.io
username: ${{ github.repository }}
password: ${{ secrets.GHCR_TOKEN }}
dockerfile: kubectl-oc/Containerfile
directory: kubectl-oc
addLatest: true
tags: ${{ matrix.version }}
buildArgs: OC_VERSION=${{ matrix.version }}
build-newman:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: checkout
- name: source-version
id: source-version
run: echo "version=$(cat newman/version)" >> $GITHUB_OUTPUT
- uses: mr-smithers-excellent/docker-build-push@v6
name: push-container-image
with:
image: newman
registry: ghcr.io
username: ${{ github.repository }}
password: ${{ secrets.GHCR_TOKEN }}
dockerfile: newman/Containerfile
directory: newman
addLatest: true
tags: ${{ steps.source-version.outputs.version }}
notify:
name: Slack Notifications
runs-on: ubuntu-latest
if: ${{ failure() }}
needs:
- build-maven
- build-newman
- build-kubectl-oc
- build-buildah
steps:
- name: Notify Slack channel on failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_ICON: https://avatars.githubusercontent.com/u/74975412?s=200&v=4
SLACK_USERNAME: ${{ github.repository }}
SLACK_COLOR: '#ff0033'
SLACK_FOOTER: ''