@@ -23,6 +23,9 @@ permissions:
2323jobs :
2424 build :
2525 runs-on : ubuntu-latest
26+ outputs :
27+ docker_build_digest : ${{ steps.docker_build.outputs.digest }}
28+ docker_meta_version : ${{ steps.docker_meta.outputs.version }}
2629 steps :
2730 - name : Checkout
2831 uses : actions/checkout@v4
@@ -95,11 +98,45 @@ jobs:
9598 cosign sign --yes --recursive \
9699 ghcr.io/tibiadata/tibiadata-api-go@${{ steps.docker_build.outputs.digest }}
97100
101+ argocd :
102+ if : github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
103+ runs-on : ubuntu-latest
104+ needs : build
105+ steps :
106+ - name : Determine the deployment subdomain
107+ id : determine_deployment
108+ run : |
109+ if [ "${{ github.event_name }}" == "release" ]; then
110+ echo "subdomain=api" >> $GITHUB_OUTPUT
111+ else
112+ echo "subdomain=dev" >> $GITHUB_OUTPUT
113+ fi
114+
115+ - name : Trigger workflow in tibiadata-argocd-app-of-apps repo
116+ uses : peter-evans/repository-dispatch@v3
117+ with :
118+ token : ${{ secrets.REPO_ACCESS_TOKEN }}
119+ repository : TibiaData/tibiadata-argocd-app-of-apps
120+ event-type : bump-tibiadata-api-go-image-sha
121+ client-payload : ' {"docker_digest": "${{ needs.build.outputs.docker_build_digest }}", "subdomain": "${{ steps.determine_deployment.outputs.subdomain }}"}'
122+
123+ helm-chart :
124+ if : github.event_name == 'release'
125+ runs-on : ubuntu-latest
126+ needs : build
127+ steps :
128+ - name : Trigger workflow in tibiadata-helm-charts repo
129+ uses : peter-evans/repository-dispatch@v3
130+ with :
131+ token : ${{ secrets.REPO_ACCESS_TOKEN }}
132+ repository : TibiaData/tibiadata-helm-charts
133+ event-type : bump-helm-chart-release
134+ client-payload : ' {"chart_name": "${{ github.event.repository.name }}", "release_version": "${{ needs.build.outputs.docker_meta_version }}"}'
135+
98136 dockerhub :
99137 if : github.event_name == 'release'
100138 runs-on : ubuntu-latest
101- needs :
102- - build
139+ needs : build
103140 steps :
104141 - name : Checkout
105142 uses : actions/checkout@v4
0 commit comments