Skip to content

Merge pull request #69 from team-withiy/issue#41/feat/nickname #50

Merge pull request #69 from team-withiy/issue#41/feat/nickname

Merge pull request #69 from team-withiy/issue#41/feat/nickname #50

Workflow file for this run

name: "CI/CD"
on:
push:
branches:
- main
jobs:
ci:
name: Docker Build
runs-on: ubuntu-latest
steps:
- 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 }}/withiy-server:latest,
ghcr.io/${{ secrets.GH_USERNAME }}/withiy-server:${{ github.sha }}
cd:
name: Argo CD
needs: ci
runs-on: ubuntu-latest
steps:
- name: Checkout withiy-infra repository
uses: actions/checkout@v4
with:
repository: team-withiy/withiy-infra
path: withiy-infra
token: ${{ secrets.GH_TOKEN }}
- name: commit & push
run: |
cd withiy-infra
git config user.name "Zerohertz"
git config user.email "[email protected]"
git config credential.helper store
sed -i 's|ghcr.io/team-withiy/withiy-server:[^ ]*|ghcr.io/team-withiy/withiy-server:${{ github.sha }}|' server-prod.yaml
git add server-prod.yaml
git commit -m ":tada: deploy: withiy-server [${{ github.sha }}]"
git push origin ${{ github.ref_name }}