Skip to content

🎉 deploy: co-co-gong-server [cace6fa82f9a9f27ba222ff2833aaf350ef… #13

🎉 deploy: co-co-gong-server [cace6fa82f9a9f27ba222ff2833aaf350ef…

🎉 deploy: co-co-gong-server [cace6fa82f9a9f27ba222ff2833aaf350ef… #13

Workflow file for this run

name: "CI/CD"
on:
push:
branches:
- "*"
- "*/*/*"
# - main
jobs:
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
- name: Login to GitHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
push: true
tags: |
ghcr.io/${{ secrets.GH_USERNAME }}/co-co-gong-server:latest,
ghcr.io/${{ secrets.GH_USERNAME }}/co-co-gong-server:${{ github.sha }}
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 }}