Skip to content

Commit

Permalink
JH: Add cache for translations
Browse files Browse the repository at this point in the history
  • Loading branch information
adeepn committed Nov 13, 2023
1 parent a975d1b commit a0db1f6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/jh-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,36 @@ jobs:
sed -i "s|pyezviz|# pyezviz|g" requirements_all.txt
sed -i "s|pykrakenapi|# pykrakenapi|g" requirements_all.txt
- name: create dir for translations
run: |
mkdir -p build/translations-download
- name: Restore cache translation files
id: cache-translations
uses: actions/cache/restore@v3
with:
path: build/translations-download/
key: core-${{ github.sha }}-translations

- name: Check cache restore result
run: |
echo ${{ steps.cache-translations.outputs.cache-hit }}
- name: Download Translations
if: ${{ steps.cache-translations.outputs.cache-hit }} == 'false'
uses: transifex/cli-action@v2
with:
token: ${{ secrets.TX_TOKEN }}
args: pull -s -t -a

- name: Save translation files into cache
if: ${{ steps.cache-translations.outputs.cache-hit }} == 'false'
uses: actions/cache/save@v3
with:
path: build/translations-download/
key: core-${{ github.sha }}-translations

- name: Write Translations
run: python3 -m script.jhtranslations download

Expand Down

0 comments on commit a0db1f6

Please sign in to comment.