Skip to content

Commit d12be1d

Browse files
authored
Use other way to call environment varaible in sync.yml
To print its value in the output
1 parent 90566b4 commit d12be1d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/sync.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Set language dir variable
4343
run:
44-
echo "LANGUAGE_DIR=cpython/Doc/locales/$PYDOC_LANGUAGE/LC_MESSAGES" >> $GITHUB_ENV
44+
echo "LANGUAGE_DIR=cpython/Doc/locales/${{ env.PYDOC_LANGUAGE }}/LC_MESSAGES" >> $GITHUB_ENV
4545

4646
- name: Checkout this repository ${{ env.PYDOC_VERSION }}
4747
uses: actions/checkout@v4
@@ -83,30 +83,30 @@ jobs:
8383
if: ${{ contains(fromJSON('["schedule", "workflow_dispatch"]'), github.event_name) }}
8484
run: |
8585
# Clean up obsolete files
86-
find ./${LANGUAGE_DIR} -name '*.po' -exec rm {} \;
86+
find ./${{ env.LANGUAGE_DIR }} -name '*.po' -exec rm {} \;
8787
./scripts/pull_translations.sh
8888
env:
8989
TX_TOKEN: ${{ secrets.TX_TOKEN }}
9090

9191
- name: powrap
9292
if: steps.pull.outcome == 'success'
9393
run: |
94-
cd ./${LANGUAGE_DIR}
94+
cd ./${{ env.LANGUAGE_DIR }}
9595
powrap *.po **/*.po
9696
9797
- name: Update statistics
9898
if: always() && inputs.secrets.TX_TOKEN != 0
9999
run: |
100-
python ./scripts/tx_stats.py > ./${LANGUAGE_DIR}/stats.json
101-
git -C ./${LANGUAGE_DIR} diff stats.json
100+
python ./scripts/tx_stats.py > ./${{ env.LANGUAGE_DIR }}/stats.json
101+
git -C ./${{ env.LANGUAGE_DIR }} diff stats.json
102102
env:
103103
TX_TOKEN: ${{ secrets.TX_TOKEN }}
104104

105105
- name: Update potodo.md
106106
if: always()
107107
run: |
108108
./scripts/potodo.sh
109-
git diff ./${LANGUAGE_DIR}/potodo.md
109+
git diff ./${{ env.LANGUAGE_DIR }}/potodo.md
110110
111111
# 4- Commit and push translations
112112

@@ -116,7 +116,7 @@ jobs:
116116
- name: Push
117117
if: ${{ contains(fromJSON('["schedule", "workflow_dispatch"]'), github.event_name) }}
118118
run: |
119-
cd ./${LANGUAGE_DIR}
119+
cd ./${{ env.LANGUAGE_DIR }}
120120
git push
121121
122122

0 commit comments

Comments
 (0)