-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1008 Bytes
/
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
name: Build & Deploy Image to OpenShift
on:
workflow_dispatch:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
name: Build & Push Image
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
context: .
layers: true
image: h-drive-email
tags: latest
labels: |
app=h-drive-email
containerfiles: ./Dockerfile
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4"
- name: Push to OpenShift ImageStream
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_image.outputs.image }}
tags: latest
registry: ${{ vars.OPENSHIFT_IMAGESTREAM_URL }}
username: ${{ secrets.OPENSHIFT_IMAGESTREAM_USERNAME }}
password: ${{ secrets.OPENSHIFT_IMAGESTREAM_TOKEN }}