From f58f240e62e3d267a2b8a377f4f8f314f4ce08d0 Mon Sep 17 00:00:00 2001 From: Yasin Date: Fri, 1 Sep 2023 07:31:42 +0200 Subject: Create webhook_translate.yml --- .github/workflows/webhook_translate.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/webhook_translate.yml (limited to '.github') diff --git a/.github/workflows/webhook_translate.yml b/.github/workflows/webhook_translate.yml new file mode 100644 index 00000000..af968db2 --- /dev/null +++ b/.github/workflows/webhook_translate.yml @@ -0,0 +1,21 @@ +name: translate update + +on: + push: + branches: + - master + paths: + - src/main/resources/assets/skyblocker/lang/en_us.json + +jobs: + your_job_name: + runs-on: ubuntu-latest + steps: + - name: Discord notification + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_TRANSLATE_WEBHOOK }} + uses: Ilshidur/action-discord@master + with: + args: | + "<@&1134566053138145330>" + "New Strings available at " -- cgit From 1ae72c1babd0599ec81274f2afef328741813877 Mon Sep 17 00:00:00 2001 From: Yasin Date: Fri, 1 Sep 2023 08:15:48 +0200 Subject: Update webhook_translate.yml Use basic curl command instead of "Ilshidur/action-discord" action and rename job --- .github/workflows/webhook_translate.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to '.github') diff --git a/.github/workflows/webhook_translate.yml b/.github/workflows/webhook_translate.yml index af968db2..5bf790c7 100644 --- a/.github/workflows/webhook_translate.yml +++ b/.github/workflows/webhook_translate.yml @@ -8,14 +8,14 @@ on: - src/main/resources/assets/skyblocker/lang/en_us.json jobs: - your_job_name: + webhook: runs-on: ubuntu-latest steps: - - name: Discord notification - env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_TRANSLATE_WEBHOOK }} - uses: Ilshidur/action-discord@master - with: - args: | - "<@&1134566053138145330>" - "New Strings available at " + - name: Translate notification + shell: bash + run: | + OUTPUT=" + <@&1134566053138145330> + New Strings available at https://translate.hysky.de/projects/Skyblocker/skyblocker" + + curl -H "Content-Type: application/json" -d '{"content":"'"${OUTPUT//$'\n'/\\n}"'", "flags": 4}' "${{ secrets.DISCORD_TRANSLATE_WEBHOOK }}" -- cgit From 3dba852fc81d0a0fd30fc8f1191327ba0e5ba534 Mon Sep 17 00:00:00 2001 From: Yasin Date: Fri, 1 Sep 2023 21:26:25 +0200 Subject: Update webhook_translate.yml (#268) prevent trigger in forks --- .github/workflows/webhook_translate.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/webhook_translate.yml b/.github/workflows/webhook_translate.yml index 5bf790c7..6d072634 100644 --- a/.github/workflows/webhook_translate.yml +++ b/.github/workflows/webhook_translate.yml @@ -9,6 +9,7 @@ on: jobs: webhook: + if: github.repository_owner == 'SkyblockerMod' runs-on: ubuntu-latest steps: - name: Translate notification -- cgit