@@ -16,56 +16,50 @@ jobs:
1616 create-translation-health-report :
1717 name : Create translation health report
1818 if : github.repository == 'github/docs-internal'
19- runs-on : ubuntu-latest
19+ runs-on : ubuntu-20.04-xl
2020 # This sets a maximum execution time of 300 minutes (5 hours)
2121 # to prevent the workflow from running longer than necessary.
2222 timeout-minutes : 300
2323 strategy :
2424 fail-fast : false
25- max-parallel : 1
2625 matrix :
2726 include :
2827 - language : es
29- language_dir : translations/es-ES
28+ language_dir : translations/es-es
3029 language_repo : github/docs-internal.es-es
3130
3231 - language : ja
33- language_dir : translations/ja-JP
32+ language_dir : translations/ja-jp
3433 language_repo : github/docs-internal.ja-jp
3534
3635 - language : pt
37- language_dir : translations/pt-BR
36+ language_dir : translations/pt-br
3837 language_repo : github/docs-internal.pt-br
3938
4039 - language : zh
41- language_dir : translations/zh-CN
40+ language_dir : translations/zh-cn
4241 language_repo : github/docs-internal.zh-cn
4342
4443 - language : ru
45- language_dir : translations/ru-RU
44+ language_dir : translations/ru-ru
4645 language_repo : github/docs-internal.ru-ru
4746
4847 - language : ko
49- language_dir : translations/ko-KR
48+ language_dir : translations/ko-kr
5049 language_repo : github/docs-internal.ko-kr
5150
5251 - language : fr
53- language_dir : translations/fr-FR
52+ language_dir : translations/fr-fr
5453 language_repo : github/docs-internal.fr-fr
5554
5655 - language : de
57- language_dir : translations/de-DE
56+ language_dir : translations/de-de
5857 language_repo : github/docs-internal.de-de
5958
6059 steps :
6160 - name : Checkout the docs-internal repo
6261 uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
6362
64- - name : Remove all language translations
65- run : |
66- git rm -rf --quiet ${{ matrix.language_dir }}/content
67- git rm -rf --quiet ${{ matrix.language_dir }}/data
68-
6963 - name : Checkout the language-specific repo
7064 uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
7165 with :
@@ -91,25 +85,42 @@ jobs:
9185 node script/i18n/create-translation-health-report.js \
9286 --language ${{ matrix.language }} \
9387 --gitref ${{ env.gitref }} \
94- >> $HOME/translation-health-report.json
88+ >> $GITHUB_WORKSPACE/translation-health-report.json
89+
90+ - name : View report in workflow
91+ run : cat $GITHUB_WORKSPACE/translation-health-report.json
9592
9693 - name : Log in to Azure
9794 uses : azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf
9895 with :
9996 creds : ${{ secrets.PROD_AZURE_CREDENTIALS }}
10097
101- - name : Upload to Azure blob storage
98+ # https://learn.microsoft.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-upload
99+ # https://github.com/marketplace/actions/azure-cli-action
100+ - name : Upload latest to Azure blob storage
102101 uses : azure/CLI@61bb69d64d613b52663984bf12d6bac8fd7b3cc8
103102 with :
104103 inlineScript : |
105104 az storage blob upload \
106105 --name "${{ matrix.language }}-latest.json" \
107- --file $HOME/translation-health-report.json \
108- --container-name translation-health-reports
106+ --file $GITHUB_WORKSPACE/translation-health-report.json \
107+ --account-name githubdocs \
108+ --account-key ${{ secrets.AZURE_GITHUBDOCS_STORAGE_KEY }} \
109+ --container-name translation-health-reports \
110+ --overwrite true
111+
112+ - name : Upload date formatted to Azure blob storage
113+ uses : azure/CLI@61bb69d64d613b52663984bf12d6bac8fd7b3cc8
114+ with :
115+ inlineScript : |
116+ # Write a date formatted for historical reference
109117 az storage blob upload \
110118 --name "${{ matrix.language }}-$(date +%Y-%m-%d).json" \
111- --file $HOME/translation-health-report.json \
112- --container-name translation-health-reports
119+ --file $GITHUB_WORKSPACE/translation-health-report.json \
120+ --account-name githubdocs \
121+ --account-key ${{ secrets.AZURE_GITHUBDOCS_STORAGE_KEY }} \
122+ --container-name translation-health-reports \
123+ --overwrite true
113124
114125 - name : Log out from Azure
115126 if : always()
0 commit comments