Track 210 - Update editing permissions for Issues and Status tabs. (#… #502
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: EPICTRACK WEB CD | |
on: | |
push: | |
branches: | |
- develop | |
paths: | |
- "epictrack-web/**" | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: "Environment (dev/test/prod)" | |
required: true | |
default: "dev" | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./epictrack-web | |
env: | |
APP_NAME: "epictrack-web" | |
TAG_NAME: "${{ github.event.inputs.environment || 'dev' }}" # If the environment type is manually selected, use the input value; otherwise, use 'dev' as default | |
jobs: | |
web-cd: | |
runs-on: ubuntu-20.04 | |
if: github.repository == 'bcgov/EPIC.track' | |
environment: | |
name: "dev" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login Openshift | |
shell: bash | |
run: | | |
oc login --server=${{secrets.OPENSHIFT_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT_SA_TOKEN}} | |
- name: Login Docker | |
run: | | |
echo "${{ secrets.OPENSHIFT_SA_TOKEN }}" | | |
docker login ${{ secrets.OPENSHIFT_IMAGE_REGISTRY }} -u ${{ secrets.OPENSHIFT_SA_NAME}} --password-stdin | |
- name: Build image | |
run: | | |
docker build . --file Dockerfile --tag image | |
- name: Push image | |
run: | | |
IMAGE_ID=${{ secrets.OPENSHIFT_IMAGE_REGISTRY }}/"${{ secrets.OPENSHIFT_REPOSITORY}}-tools"/$APP_NAME | |
docker tag image $IMAGE_ID:latest | |
docker push $IMAGE_ID:latest | |
docker image tag $IMAGE_ID:latest $IMAGE_ID:$TAG_NAME | |
docker push $IMAGE_ID:$TAG_NAME | |
- name: Rollout | |
shell: bash | |
run: | | |
oc rollout status dc/${{ env.APP_NAME }} -n ${{ secrets.OPENSHIFT_REPOSITORY }}-${{ env.TAG_NAME }} -w |