Skip to content

Commit 2bb27f4

Browse files
committed
ci: add jobs for argo and helm-chart
1 parent 3a78cd1 commit 2bb27f4

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ permissions:
2323
jobs:
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

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ jobs:
4545
with:
4646
token: ${{ secrets.REPO_ACCESS_TOKEN }}
4747
repository: TibiaData/tibiadata-api-docs
48-
event-type: tibiadata-api-go-release
48+
event-type: tibiadata-api-docs-release-update
4949
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag_name": "${{ github.event.release.tag_name }}"}'

0 commit comments

Comments
 (0)