Skip to content

Commit

Permalink
✨ chore: argo cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerohertz committed Jan 7, 2025
1 parent e5a4bd6 commit 28ac44c
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
# - main

jobs:
build:
ci:
name: Docker Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -29,4 +30,25 @@ jobs:
ghcr.io/${{ secrets.GH_USERNAME }}/co-co-gong-server:latest,
ghcr.io/${{ secrets.GH_USERNAME }}/co-co-gong-server:${{ github.sha }}
# TODO: ghcr.io & Argo CD (related: #22)
cd:
name: Argo CD
needs: ci
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}

- name: Change manifest
run: |
sed -i 's|ghcr.io/co-co-gong-server:[^ ]*|ghcr.io/co-co-gong-server:${{ github.sha }}|' k8s/deploy/backend.yaml
- name: git push
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config credential.helper store
git add k8s/deploy/backend.yaml
git commit -m ":tada: deploy: co-co-gong-server [${{ github.sha }}]"
git push origin ${{ github.ref_name }}

0 comments on commit 28ac44c

Please sign in to comment.