aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/sync_crowdin.yml
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-08-30 22:08:46 +0530
committerGitHub <noreply@github.com>2022-08-30 16:38:46 +0000
commiteb042024104ca9ff6271f595f0699d5ea2c4435b (patch)
treeb88a74650c01821a257c1b15a7d4740d48accf10 /.github/workflows/sync_crowdin.yml
parent302eefe791b58d56aeab630ca621a8dd21dff885 (diff)
Enable new gradle-home-cache-cleanup option (#2096)
Diffstat (limited to '.github/workflows/sync_crowdin.yml')
-rw-r--r--.github/workflows/sync_crowdin.yml16
1 files changed, 14 insertions, 2 deletions
diff --git a/.github/workflows/sync_crowdin.yml b/.github/workflows/sync_crowdin.yml
index ef49a402..f16d250e 100644
--- a/.github/workflows/sync_crowdin.yml
+++ b/.github/workflows/sync_crowdin.yml
@@ -2,7 +2,7 @@ name: Sync localisations from Crowdin
on:
workflow_dispatch:
schedule:
- - cron: '0 0 * * 6'
+ - cron: '0 0 * * 0'
jobs:
sync-crowdin:
@@ -21,6 +21,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0
with:
arguments: --no-configuration-cache crowdin
+ gradle-home-cache-cleanup: true
env:
CROWDIN_LOGIN: ${{ secrets.CROWDIN_LOGIN }}
CROWDIN_PROJECT_KEY: ${{ secrets.CROWDIN_PROJECT_KEY }}
@@ -30,10 +31,10 @@ jobs:
run: if [[ $(git diff --stat) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
- name: Create Pull Request
+ id: cpr
uses: peter-evans/create-pull-request@v4.1.1
if: "env.UPDATED == 'true'"
with:
- assignees: msfjarvis
author: GitHub Actions <noreply@github.com>
base: develop
body: This is an automated pull request to sync localisations from Crowdin.
@@ -42,3 +43,14 @@ jobs:
labels: A-localisation, P-low, S-waiting-on-review
title: Sync localisations from Crowdin
token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Close, re-open and enable squash merge for PR
+ if: "${{ steps.cpr.outputs.pull-request-operation == 'created' }}"
+ shell: bash
+ run: |
+ gh pr close "${PR_URL}"
+ gh pr reopen "${PR_URL}"
+ gh pr merge --squash --auto "${PR_URL}"
+ env:
+ GITHUB_TOKEN: ${{ secrets.PSL_UPDATE_TOKEN }}
+ PR_URL: ${{ steps.cpr.outputs.pull-request-url }}