Skip to content

deploy-prod

deploy-prod #21

Workflow file for this run

name: Deploy prod (GitOps)
on:
repository_dispatch:
types:
- deploy-prod
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout GitOps Repo
uses: actions/checkout@v4
- name: Validate payload
run: |
echo "SERVICE=${{ github.event.client_payload.service }}"
echo "IMAGE=${{ github.event.client_payload.image }}"
echo "TAG=${{ github.event.client_payload.tag }}"
- name: Update prod image tag
run: |
SERVICE=${{ github.event.client_payload.service }}
cd prod/${SERVICE}
kustomize edit set image \
REPLACE_IMAGE_${SERVICE^^}=${{ github.event.client_payload.image }}:${{ github.event.client_payload.tag }}
- name: Commit and Push
run: |
git config user.name "eventee-prod-ci"
git config user.email "ci@eventee.cloud"
git commit -am "(chore/prod): deploy ${{ github.event.client_payload.service }} ${{ github.event.client_payload.tag }}" || echo "no changes"
git push origin main