Skip to content

Update ensure-plant-chat-ui.yaml #48

Update ensure-plant-chat-ui.yaml

Update ensure-plant-chat-ui.yaml #48

Workflow file for this run

name: ci
on:
push:
branches: ["main"]
workflow_dispatch:
env:
SEM_VER: 0.0.1
IMAGE_NAME: ghcr.io/${{ github.repository }}/${{ github.event.repository.name }}
jobs:
Build_Push_Image:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Login to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Image Tag
id: generate_image_tag
run: |
IMAGE_TAG=${{ env.SEM_VER }}-${{ github.run_number }}
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
VERSION=${{ env.SEM_VER }}-${{ github.run_number }}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build and Push to ghcr
uses: docker/build-push-action@v2
with:
push: true
context: .
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}, ${{ env.IMAGE_NAME }}:latest
- name: Start CD
run: |
gh workflow run cd.yml -f environment="$START_ENVIRONMENT" -f commit_id="$PROMOTED_COMMIT_ID" -f image_tag="$IMAGE_TAG" -f version="$VERSION"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROMOTED_COMMIT_ID: ${{ github.sha }}
START_ENVIRONMENT: ${{ vars.START_ENVIRONMENT }}