Skip to content

Promote to prod

Promote to prod #1

Workflow file for this run

name: Promote to prod
on:
workflow_dispatch:
jobs:
promote:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Copy dev tag to prod
run: |
DEV_TAG=$(grep -A1 "name: image.tag" manifests/argocd/app-dev.yaml | grep value | awk '{print $2}' | tr -d '"')
sed -i "/name: image.tag/{n;s|value:.*|value: \"$DEV_TAG\"|}" manifests/argocd/app-prod.yaml
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add manifests/argocd/app-prod.yaml
git commit -m "ci: promote $DEV_TAG to prod"
git push