From 3951e29a340e917d158ec061ee671c4ae0f9c8ec Mon Sep 17 00:00:00 2001 From: Refringe Date: Mon, 8 Apr 2024 22:00:02 +0000 Subject: [PATCH] Refresh ItemDB Cache Workflow (!282) This commit adds a workflow that will send an API request to the item DB website that will clear its cache. It will run whenever there is a commit on the `master` branch with a change to one of the files within the `project/assets/database` directory. Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/282 Co-authored-by: Refringe Co-committed-by: Refringe --- .gitea/workflows/clear-itemdb-cache.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitea/workflows/clear-itemdb-cache.yaml diff --git a/.gitea/workflows/clear-itemdb-cache.yaml b/.gitea/workflows/clear-itemdb-cache.yaml new file mode 100644 index 00000000..8783caa3 --- /dev/null +++ b/.gitea/workflows/clear-itemdb-cache.yaml @@ -0,0 +1,21 @@ +name: Clear Item DB Website Cache + +on: + push: + branches: [ master ] + +jobs: + clear-cache: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - id: filter + uses: dorny/paths-filter@v3.0.2 + with: + list-files: shell + filters: | + database: + - 'project/assets/database/**' + - name: Send Refresh Request + if: steps.filter.outputs.database == 'true' + run: curl --max-time 30 https://db.sp-tarkov.com/api/refresh