-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (43 loc) · 2.05 KB
/
frontend-automation-tests-build.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
47
48
49
50
51
name: Build & Push Frontend Automation Test Image to Gold and GoldDR
on:
push:
branches: [feature/automation-test]
paths:
- 'cccm-automation-test-ui/**'
- ".github/workflows/frontend-automation-tests-build.yaml"
workflow_dispatch:
env:
# See https://github.com/goodwithtech/dockle/issues/188
DOCKLE_HOST: "unix:///var/run/docker.sock"
IMAGE_NAME: automation-test-ui
WORKING_DIRECTORY: ./cccm-automation-test-ui
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Openshift Docker Registry Gold
uses: docker/login-action@v1
with:
registry: ${{ secrets.OPENSHIFT4_REGISTRY }}
username: ${{ secrets.OPENSHIFT4_SA_USERNAME }}
password: ${{ secrets.OPENSHIFT4_SA_PASSWORD }}
- name: Login to Openshift Docker Registry GoldDR
uses: docker/login-action@v1
with:
registry: ${{ secrets.OPENSHIFT4_REGISTRY_GOLDDR }}
username: ${{ secrets.OPENSHIFT4_SA_USERNAME }}
password: ${{ secrets.OPENSHIFT4_SA_PASSWORD_GOLDDR }}
- name: Docker Build Frontend Image
run: |
docker build -t ${{ secrets.OPENSHIFT4_REGISTRY }}/${{ secrets.LICENSE_PLATE }}-tools/${{env.IMAGE_NAME}}:dev .
- name: Vulnerability Scan Frontend
uses: Azure/container-scan@v0
continue-on-error: true
with:
image-name: ${{ secrets.OPENSHIFT4_REGISTRY }}/${{ secrets.LICENSE_PLATE }}-tools/${{env.IMAGE_NAME}}:dev
- name: Docker Push Version to Gold and GoldDR
run: |
docker push ${{ secrets.OPENSHIFT4_REGISTRY }}/${{ secrets.LICENSE_PLATE }}-tools/${{env.IMAGE_NAME}}:dev
docker tag ${{ secrets.OPENSHIFT4_REGISTRY }}/${{ secrets.LICENSE_PLATE }}-tools/${{env.IMAGE_NAME}}:dev ${{ secrets.OPENSHIFT4_REGISTRY_GOLDDR }}/${{ secrets.LICENSE_PLATE }}-tools/${{env.IMAGE_NAME}}:dev
docker push ${{ secrets.OPENSHIFT4_REGISTRY_GOLDDR }}/${{ secrets.LICENSE_PLATE }}-tools/${{env.IMAGE_NAME}}:dev