Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,20 @@ jobs:
echo "subdomain=dev" >> $GITHUB_OUTPUT
fi

- name: Create tibiadata-argocd-app-of-apps dispatch token
id: app_token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ vars.TIBIADATA_CI_CLIENT_ID }}
private-key: ${{ secrets.TIBIADATA_CI_PRIVATE_KEY }}
owner: tibiadata
repositories: tibiadata-argocd-app-of-apps
permission-contents: write

- name: Trigger workflow in tibiadata-argocd-app-of-apps repo
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 #v4.0.1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
token: ${{ steps.app_token.outputs.token }}
repository: tibiadata/tibiadata-argocd-app-of-apps
event-type: bump-tibiadata-api-go-image-sha
client-payload: |-
Expand All @@ -297,10 +307,20 @@ jobs:
- manifest

steps:
- name: Create tibiadata-helm-charts dispatch token
id: app_token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ vars.TIBIADATA_CI_CLIENT_ID }}
private-key: ${{ secrets.TIBIADATA_CI_PRIVATE_KEY }}
owner: tibiadata
repositories: tibiadata-helm-charts
permission-contents: write

- name: Trigger workflow in tibiadata-helm-charts repo
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 #v4.0.1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
token: ${{ steps.app_token.outputs.token }}
repository: tibiadata/tibiadata-helm-charts
event-type: bump-helm-chart-release
client-payload: |-
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,20 @@ jobs:
file: docs/swagger.json
tag: ${{ github.ref }}

- name: Create tibiadata-api-docs dispatch token
id: app_token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ vars.TIBIADATA_CI_CLIENT_ID }}
private-key: ${{ secrets.TIBIADATA_CI_PRIVATE_KEY }}
owner: tibiadata
repositories: tibiadata-api-docs
permission-contents: write

- name: Trigger workflow in tibiadata-api-docs repo
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 #v4.0.1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
token: ${{ steps.app_token.outputs.token }}
repository: tibiadata/tibiadata-api-docs
event-type: tibiadata-api-docs-release-update
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag_name": "${{ github.event.release.tag_name }}"}'
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Documentation of API endpoints can be found on [docs.tibiadata.com](https://docs
- [Available endpoints](#available-endpoints)
- [Deprecated endpoints](#deprecated-endpoints)
- [Restricted endpoints](#restricted-endpoints)
- [CI authentication](#ci-authentication)
- [General information](#general-information)
- [Credits](#credits)

Expand Down Expand Up @@ -228,6 +229,19 @@ The data returned by the HTML and JSON collector can differ, which may lead to d

- Account achievements on the HTML page do not reflect the actual achievements grade as correctly shown by the JSON collector.

## CI authentication

The build and documentation workflows use the `tibiadata-ci` GitHub App to send
cross-repository `repository_dispatch` events. Organization Actions variable
`TIBIADATA_CI_CLIENT_ID` and secret `TIBIADATA_CI_PRIVATE_KEY` must be available to
this repository. The app must be installed on `tibiadata-api-docs`,
`tibiadata-argocd-app-of-apps`, and `tibiadata-helm-charts` with **Contents: write**
permission.

Each dispatch creates a short-lived installation token restricted to its
destination repository and **Contents: write**. The token is revoked at the end
of the job. Other operations continue to use the workflow's `GITHUB_TOKEN`.

## General information

Tibia is a registered trademark of [CipSoft GmbH](https://www.cipsoft.com/en/). Tibia and all products related to Tibia are copyright by [CipSoft GmbH](https://www.cipsoft.com/en/).
Expand Down
Loading