-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfrontend-analytics-image-build-push.yaml
More file actions
46 lines (39 loc) · 1.3 KB
/
frontend-analytics-image-build-push.yaml
File metadata and controls
46 lines (39 loc) · 1.3 KB
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
# GitHub Actions workflow for building and tagging the APP image on PR
name: Frontend Analytics Build and Push on PR
on:
pull_request:
types:
- opened
- synchronize
- ready_for_review
branches:
- main
paths:
- web/frontend-feedback-analytics/**
jobs:
# Job to build, tag, and push the image
build-tag-push:
environment: dev
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Login to BC Gov OCP ImageStream
- name: Login to OCP
run : |
docker login ${{ secrets.OPENSHIFT_IMAGE_REPOSITORY }} -u ${{ secrets.OPENSHIFT_SA_TOOLS_NAME }} -p ${{ secrets.OPENSHIFT_SA_TOOLS_TOKEN }}
# Build the image
- name: Build Image
run: |
docker compose -f ${{ vars.COMPOSE_FILE_NAME }} build web_frontend_feedback_analytics
# Tag the image
- name: Tag Image
run: |
docker tag docker-web_frontend_feedback_analytics ${{ secrets.OPENSHIFT_IMAGE_REPOSITORY }}/ai-frontend-analytics-imagestream:${{github.event.pull_request.number}}
# Push the image
- name: Push Image
run: |
docker push ${{ secrets.OPENSHIFT_IMAGE_REPOSITORY }}/ai-frontend-analytics-imagestream:${{ github.event.pull_request.number }}