Skip to content

Commit

Permalink
Sync deployment using Argo CD
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Aug 15, 2024
1 parent b6bcb4a commit 6b77650
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Deploy

on:
workflow_dispatch:
workflow_run:
workflows: ["Release"]
types:
Expand All @@ -13,8 +14,23 @@ jobs:
runs-on: ubuntu-latest
environment: prod
concurrency: prod
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Deploy
run: |
echo hello world
- name: Install ArgoCD
run: |
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
install -m 555 argocd-linux-amd64 /usr/local/bin/argocd && rm argocd-linux-amd64
- name: Sync
run: argocd app sync ccp --server "$ARGOCD_SERVER" --auth-token "$ARGOCD_TOKEN"
env:
ARGOCD_SERVER: ${{ secrets.ARGOCD_SERVER }}
ARGOCD_TOKEN: ${{ secrets.ARGOCD_TOKEN }}
ARGOCD_HOSTNAME: ${{ secrets.ARGOCD_HOSTNAME }}
K8S_CLUSTER_HOSTNAME: ${{ secrets.K8S_CLUSTER_HOSTNAME }}
- name: Wait
run: argocd app wait ccp --server "$ARGOCD_SERVER" --auth-token "$ARGOCD_TOKEN"
env:
ARGOCD_SERVER: ${{ secrets.ARGOCD_SERVER }}
ARGOCD_TOKEN: ${{ secrets.ARGOCD_TOKEN }}
ARGOCD_HOSTNAME: ${{ secrets.ARGOCD_HOSTNAME }}
K8S_CLUSTER_HOSTNAME: ${{ secrets.K8S_CLUSTER_HOSTNAME }}

0 comments on commit 6b77650

Please sign in to comment.