Skip to content

Commit 24f8979

Browse files
authored
supply default branch name for cron action runs (#1696)
1 parent 42633d9 commit 24f8979

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/crowdin-download-workflow.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
required: true
99
default: "main"
1010
schedule:
11-
- cron: '0 20 * * *' # Runs daily at 20:00 UTC (15:00 Central)
11+
- cron: '0 * * * *' # Runs daily at 20:00 UTC (15:00 Central)
1212

1313
permissions:
1414
contents: write
@@ -19,14 +19,16 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
env:
22+
TARGET_BRANCH:
23+
${{ github.event.inputs.target_branch || 'main' }}
2224
BRANCH_NAME:
23-
feature/crowdin-download-${{ github.event.inputs.target_branch }}
25+
feature/crowdin-download-${{ github.event.inputs.target_branch || 'main' }}
2426

2527
steps:
2628
- name: Checkout target branch
2729
uses: actions/checkout@v4
2830
with:
29-
ref: ${{ github.event.inputs.target_branch }}
31+
ref: ${{ env.TARGET_BRANCH }}
3032
fetch-depth: 0
3133

3234
- name: Set up Git
@@ -116,7 +118,7 @@ jobs:
116118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117119
run: |
118120
gh pr create --repo ${{ github.repository }} \
119-
--base ${{ github.event.inputs.target_branch }} \
121+
--base ${{ env.TARGET_BRANCH }} \
120122
--head $BRANCH_NAME \
121123
--title "Download translations and copy ignored files" \
122124
--body "This PR was created by GitHub Actions to download crowdin translations and run crowdin:fix command."

0 commit comments

Comments
 (0)