Skip to content

Commit

Permalink
Merge pull request #124 from galasa-dev/iss1950
Browse files Browse the repository at this point in the history
Add trigger for framework with GH CLI
  • Loading branch information
jadecarino committed Aug 1, 2024
2 parents f6fc6e1 + f8c0bc9 commit ba3892c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Main build

on:
workflow_dispatch:
push:
branches: [main]

Expand Down Expand Up @@ -112,4 +113,22 @@ jobs:
ARGOCD_AUTH_TOKEN: ${{ secrets.ARGOCD_TOKEN }}
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app actions run gh-maven-repos restart --kind Deployment --resource-name maven-gh --server argocd.galasa.dev
# Wait for the application to show as healthy in ArgoCD
- name: Wait for app health in ArgoCD
env:
ARGOCD_AUTH_TOKEN: ${{ secrets.ARGOCD_TOKEN }}
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app wait gh-maven-repos --resource apps:Deployment:maven-gh --health --server argocd.galasa.dev
trigger-framework-workflow:
name: Trigger Framework workflow
runs-on: ubuntu-latest
needs: build-maven

steps:
- name: Trigger Framework workflow dispatch event with GitHub CLI
env:
GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }}
run: |
gh workflow run build.yaml --repo https://github.com/galasa-dev/framework

0 comments on commit ba3892c

Please sign in to comment.