-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.25 KB
/
cd.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
44
45
46
name: Continuous Deployment to Openshift
on:
push:
branches:
- master
jobs:
CD:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: '4.13'
- name: Authenticate and set context
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ secrets.OKD4_HOST }}
openshift_token: ${{ secrets.OKD4_TOKEN }}
certificate_authority_data: ${{ secrets.OKD4_CA }}
namespace: 'verseghy-website-beta'
- name: Buildah Build
uses: redhat-actions/buildah-build@v2
with:
image: verseghy/website_frontend2
tags: latest
containerfiles: |
./Dockerfile
- name: Push To Dockerhub
uses: redhat-actions/push-to-registry@v2
with:
image: verseghy/website_frontend2
tags: latest
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_AT }}
- name: Restart deployment
shell: bash
run: |
oc rollout restart deployment website-frontend2