-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (37 loc) · 1.16 KB
/
build-image.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
name: Build Image
on:
workflow_dispatch: {}
push:
branches: [main]
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
env:
BASE_IMAGE: "registry.access.redhat.com/ubi8/python-39:latest"
REGISTRY: quay.io/rhiap
IMAGE_NAME: kubeflow-example
MAIN_TAG: latest-${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@v2
# Setup S2i and Build container image
- name: Setup and Build
id: build_image
uses: redhat-actions/s2i-build@v2
with:
builder_image: ${{ env.BASE_IMAGE }}
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.MAIN_TAG }}
- name: Add tags
run: |
docker tag ${{ env.IMAGE_NAME }}:${{ env.MAIN_TAG }} ${{ env.IMAGE_NAME }}:latest
# Push Image to Quay registry
- name: Push To Quay Action
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }} latest
registry: ${{ env.REGISTRY }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}