-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (48 loc) · 1.39 KB
/
push-images.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
name: Push Images
on:
push:
tags:
- '*'
jobs:
build-images:
name: Build Images
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- name: 'jkube-java'
args: ''
- name: 'jkube-java-17'
args: ''
- name: 'jkube-java-11'
args: ''
- name: 'jkube-jetty9'
args: ''
- name: 'jkube-karaf'
args: ''
- name: 'jkube-remote-dev'
args: ''
- name: 'jkube-tomcat9'
args: --no-squash
- name: 'jkube-tomcat'
args: --no-squash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install CEKit
uses: cekit/[email protected]
- name: Get Tag
id: get_version
run: |
export GITHUB_TAG=${GITHUB_REF/refs\/tags\//}
echo "TAG=quay.io/jkube/${{ matrix.image.name }}:${GITHUB_TAG/v/}" >> $GITHUB_ENV
- name: Build ${{ matrix.image.name }}
run: |
echo "Building ${TAG}"
cekit --descriptor ${{ matrix.image.name }}.yaml build docker ${{ matrix.image.args }} --tag="${TAG}"
- name: Push quay.io/jkube/${{ matrix.image.name }}
run: |
echo "Pushing ${TAG}"
docker login -u=${{ secrets.QUAY_USER }} -p=${{ secrets.QUAY_TOKEN }} quay.io
docker push ${TAG}