Promoting the image ai-reviewer-api:latest to prod #18
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
# Deploy an artifact onto Dev, Test, or Prod | |
name: Promote | |
run-name: |- | |
Promoting the image ${{ github.event.inputs.application }}:${{ github.event.inputs.source_image_tag }} | |
to ${{ github.event.inputs.environment }} | |
on: | |
workflow_dispatch: | |
inputs: | |
application: | |
required: true | |
description: What application you want to promote? | |
type: choice | |
options: | |
- ai-reviewer-api | |
- ai-reviewer-admin | |
source_image_tag: | |
required: true | |
description: What is the tag that is going to be promoted? | |
type: string | |
default: dev | |
environment: | |
required: true | |
description: What is the targeted environment? | |
type: choice | |
options: | |
- dev | |
- test | |
- prod | |
jobs: | |
approval: | |
name: "Wait for approval to deploy onto ${{ github.event.inputs.environment }}" | |
runs-on: ubuntu-latest | |
environment: ${{ github.event.inputs.environment }} | |
steps: | |
- name: "Approval Log" | |
run: |- | |
echo "The deployment of ${{ github.event.inputs.application }}:${{ github.event.inputs.source_image_tag }} \n | |
to ${{ github.event.inputs.environment }} was approved." | |
promote_image: | |
needs: | |
- approval | |
uses: SierraSystems/reusable-workflows/.github/workflows/openshift-tag-image.yml@main | |
with: | |
image_stream_name: "${{ github.event.inputs.application }}" | |
source_image_tag: "${{ github.event.inputs.source_image_tag }}" | |
image_tags: "${{ github.event.inputs.environment }}" | |
secrets: | |
openshift_namespace: "${{ secrets.OPENSHIFT_LICENSE_PLATE_SILVER }}-tools" | |
openshift_server_url: "${{ secrets.OPENSHIFT4_SERVER_URL }}" | |
openshift_token: "${{ secrets.OPENSHIFT_SA_PIPELINE_TOKEN_SILVER }}" | |
openshift_external_repository: "${{ secrets.OPENSHIFT4_EXTERNAL_REPOSITORY }}" |