Skip to content

Commit 7e3fe69

Browse files
committed
Update build.yml
1 parent eb1016e commit 7e3fe69

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build & Deploy Image to OpenShift
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
name: Build & Push Image
12+
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
17+
- name: Build Image
18+
id: build_image
19+
uses: redhat-actions/buildah-build@v2
20+
with:
21+
context: .
22+
layers: true
23+
image: dbvalidation
24+
tags: latest
25+
labels: |
26+
app=dbvalidation
27+
containerfiles: ./Dockerfile
28+
29+
- name: Install CLI tools from OpenShift Mirror
30+
uses: redhat-actions/openshift-tools-installer@v1
31+
with:
32+
oc: "4"
33+
34+
- name: Push to OpenShift ImageStream
35+
uses: redhat-actions/push-to-registry@v2
36+
with:
37+
image: ${{ steps.build_image.outputs.image }}
38+
tags: latest
39+
registry: ${{ vars.OPENSHIFT_IMAGESTREAM_URL }}
40+
username: ${{ secrets.OPENSHIFT_IMAGESTREAM_USERNAME }}
41+
password: ${{ secrets.OPENSHIFT_IMAGESTREAM_TOKEN }}

0 commit comments

Comments
 (0)