Skip to content

Merge branch 'test' #19

Merge branch 'test'

Merge branch 'test' #19

name: Build WebAPI
on:
push:
branches: [main]
paths:
- "backend/webapi/**"
- "backend/webapi.tests/**"
workflow_dispatch:
env:
ORIG_TAG: test
PROMOTE_TAG: main
# This will terminate builds that are previously, but continuing to run. Saves GHA hours.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
promote-image-to-prod:
name: WebAPI Backend Promote to prod
runs-on: ubuntu-latest
steps:
- name: Install oc
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.7"
- name: oc login
run: |
oc login --token=${{ secrets.OPENSHIFT_GHA_SERVICE_ACCOUNT_TOKEN }} --server=${{ secrets.OPENSHIFT_CLUSTER_URL }}
- name: Promote webapi from test to prod
run: |
oc -n d8a8f9-tools tag \
d8a8f9-tools/pidp-webapi:${{ env.ORIG_TAG }} \
d8a8f9-tools/pidp-webapi:${{ env.PROMOTE_TAG }}