Skip to content

Commit

Permalink
Fix branch name (#224)
Browse files Browse the repository at this point in the history
* Fix branch name

* changed var to env
  • Loading branch information
AleksSavelev authored Aug 13, 2024
1 parent 747854b commit 712b8e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/updateLocalizations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ jobs:
GH_TOKEN: ${{secrets.LOC_TOKEN}}
APPROVE_BOT_NAME: ${{secrets.APPROVE_BOT_NAME}}
APPROVE_BOT_EMAIL: ${{secrets.APPROVE_BOT_EMAIL}}
BRANCH_PATTERN: ${{vars.BRANCH_PATTERN}}
outputs:
branch-name: ${{steps.info.outputs.branch-name}}
pr-name: ${{steps.info.outputs.pr-name}}
steps:
- name: Prepare info
id: info
run: |
echo "branch-name=$(date +"$BRANCH_PATTERN_%F_%H-%M-%S")" >> $GITHUB_OUTPUT
echo "branch-name=$(date +"${{ env.BRANCH_PATTERN }}_%F_%H-%M-%S")" >> $GITHUB_OUTPUT
echo "pr-name=$(date +'New translations (%F %T %Z)')" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -169,7 +168,7 @@ jobs:
repoName=$(echo $folder| cut -d'/' -f 2)
echo "::group::Delete old PRs in $repoName"
# List open pull requests and filter by branch pattern
matching_prs=$(gh pr list --repo "$REPO_OWNER/$repoName" --state open --json number,headRefName \
matching_prs=$(gh pr list --repo "$REPO_OWNER/$repoName" -A "@me" --state open --json number,headRefName \
--jq ".[] | select(.headRefName | test(\"$BRANCH_PATTERN\")) | .number")
if [ -z "$matching_prs" ]; then
Expand All @@ -184,7 +183,7 @@ jobs:
echo "::endgroup::"
done
env:
BRANCH_PATTERN: '${{vars.BRANCH_PATTERN}}_.*'
BRANCH_PATTERN: '${{ env.BRANCH_PATTERN }}_.*'
REPO_OWNER: 'microsoft'
- name: Commit and push new changes to submodules
run: |
Expand Down

0 comments on commit 712b8e9

Please sign in to comment.