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 cace6fa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ on:
# - main

jobs:
build:
ci:
name: Docker Build
if: ${{ github.actor != 'github-actions[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Debug actor
run: |
echo "GitHub Actor: ${{ github.actor }}"
- name: Checkout repository
uses: actions/checkout@v4

Expand All @@ -29,4 +35,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 }}
1 change: 1 addition & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- "*"
- "*/*/*"
pull_request:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion k8s/deploy/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: backend
image: ghcr.io/co-co-gong-server:tag
image: ghcr.io/co-co-gong-server:ad1c24956e77f320349077d46cfda7506b2df2fb
env:
- name: POSTGRES_HOST
value: "postgres"
Expand Down

0 comments on commit cace6fa

Please sign in to comment.