-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (45 loc) · 1.22 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
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
image:
runs-on: ubuntu-latest
strategy:
matrix:
oc:
- "4.12"
- "4.13"
- "4.14"
- "4.15"
- "4.16"
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Login to quay.io
uses: docker/login-action@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_PASSWORD }}
- name: Docker build
uses: docker/build-push-action@v6
with:
context: "v${{ matrix.oc }}"
file: "v${{ matrix.oc }}/Dockerfile"
push: ${{ github.ref == 'refs/heads/master' }}
tags: |
docker.io/appuio/oc:v${{ matrix.oc }}
quay.io/appuio/oc:v${{ matrix.oc }}