Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
Add trigger for extensions with GH CLI (#607)
Browse files Browse the repository at this point in the history
* Use new GHCR image

Signed-off-by: Jade Carino <[email protected]>

* Trigger extensions workflow after framework

Signed-off-by: Jade Carino <[email protected]>

* Needs workflow dispatch for trigger

Signed-off-by: Jade Carino <[email protected]>

---------

Signed-off-by: Jade Carino <[email protected]>
  • Loading branch information
jadecarino authored Aug 1, 2024
1 parent 3dae0f3 commit 9e0f5e8
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .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 @@ -87,7 +88,14 @@ jobs:
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 actions run gh-maven-repos restart --kind Deployment --resource-name framework-gh --server argocd.galasa.dev
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 framework-gh --server argocd.galasa.dev
- 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:framework-gh --health --server argocd.galasa.dev
build-rest-api-documentation:
name: Build REST API documentation using openapi2beans and gradle
Expand Down Expand Up @@ -137,4 +145,22 @@ jobs:
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 actions run gh-maven-repos restart --kind Deployment --resource-name restapidocsite-gh --server argocd.galasa.dev
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 restapidocsite-gh --server argocd.galasa.dev
- 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:restapidocsite-gh --health --server argocd.galasa.dev
trigger-extensions-workflow:
name: Trigger Extensions workflow
runs-on: ubuntu-latest
needs: [build-framework, build-rest-api-documentation]

steps:
- name: Trigger Extensions 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/extensions

0 comments on commit 9e0f5e8

Please sign in to comment.