3333 with :
3434 driver-opts : network=host
3535
36- # PRs to the `dev` branch push to the `dev` environment in OpenShift
37- # PRs to `test` push to `test`
38- # PRs to `main` push to `prod`
36+ # PRs to `dev` branch get deployed to `dev` environment in OpenShift
37+ # PRs to `test` get deployed to `test`
38+ # PRs to `main` get deployed to `prod`
3939 - name : Determine environment tag
4040 id : env-tag
4141 run : |
@@ -52,21 +52,13 @@ jobs:
5252 fi;
5353 shell : bash
5454
55- - name : Build image with docker build
56- run : docker build ./graphemes-api -f ./graphemes-api/Dockerfile -t graphemes-api:latest --build-arg GITHUB_SHA=${{ github.sha }}
57-
58- - name : Login to OpenShift Silver image registry
59- uses : docker/login-action@v3
55+ # Use the GHCR builder action
56+ - name : Build and push Docker image to GHCR
57+ uses : bcgov-nr/action-builder-ghcr@ace71f7a527ca6fc43c15c7806314be5a4579d2c # v.2.3.0
6058 with :
61- registry : image-registry.apps.silver.devops.gov.bc.ca
62- # This refers to the serviceaccount name alone, not the fully qualified
63- # value that comes out of `oc whoami` when logged in as the SA.
64- # Ex: For `system:serviceaccount:<name space>:<service account name>`,
65- # just use `<service account name>`.
66- username : ${{ secrets.OPENSHIFT_SILVER_SERVICEACCOUNT_USERNAME }}
67- password : ${{ secrets.OPENSHIFT_SILVER_SERVICEACCOUNT_TOKEN }}
68-
69- - name : Tag and push Docker image
70- run : |
71- docker tag graphemes-api:latest image-registry.apps.silver.devops.gov.bc.ca/${{ secrets.OPENSHIFT_SILVER_LICENSE_PLATE }}-tools/graphemes-api:${{ env.tag }}
72- docker push image-registry.apps.silver.devops.gov.bc.ca/${{ secrets.OPENSHIFT_SILVER_LICENSE_PLATE }}-tools/graphemes-api:${{ env.tag }}
59+ package : graphemes-api
60+ tag : ${{ env.tag }}
61+ triggers : graphemes-api/**
62+ build_context : ./graphemes-api
63+ build_file : ./graphemes-api/Dockerfile
64+ keep_versions : 10
0 commit comments