CI_Run_tx2s3 #8010
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI_Run_tx2s3 | |
on: | |
schedule: | |
- cron: '*/15 * * * *' # Every 15 minutes | |
workflow_dispatch: | |
jobs: | |
tx2s3: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: "Configure workflow" | |
run: | | |
DO_RUN='true' | |
if [ -z "${{ secrets.TRANSIFEX_API_TOKEN }}" ]; then DO_RUN='false'; fi | |
if [ -z "${{ secrets.S3_KEY }}" ]; then DO_RUN='false'; fi | |
if [ -z "${{ secrets.S3_SECRET }}" ]; then DO_RUN='false'; fi | |
if [ $DO_RUN == 'false' ]; then | |
echo "not set credentials, not possible run" | |
fi | |
echo "DO_RUN=$DO_RUN" >> $GITHUB_ENV | |
echo "DO_RUN: $DO_RUN" | |
- name: Clone repository | |
if: env.DO_RUN == 'true' | |
uses: actions/checkout@v3 | |
- name: Setup environment | |
if: env.DO_RUN == 'true' | |
run: | | |
# lrelease | |
sudo bash ./build/ci/translation/qt_install.sh | |
sudo bash ./build/ci/translation/tx_install.sh -s linux -t ${{ secrets.TRANSIFEX_API_TOKEN }} | |
sudo bash ./build/ci/tools/s3_install.sh --s3_key ${{ secrets.S3_KEY }} --s3_secret ${{ secrets.S3_SECRET }} | |
sudo bash ./build/ci/tools/make_build_number.sh | |
BUILD_NUMBER=$(cat ./build.artifacts/env/build_number.env) | |
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV | |
echo "BUILD_NUMBER: $BUILD_NUMBER" | |
- name: Update .ts files (tx pull) | |
if: env.DO_RUN == 'true' | |
run: | | |
sudo bash ./build/ci/translation/tx_pull.sh | |
- name: Pack and send to s3 | |
if: env.DO_RUN == 'true' | |
run: | | |
sudo bash ./build/ci/translation/s3_packandsend.sh | |
- name: Upload artifacts on GitHub | |
if: env.DO_RUN == 'true' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: MuseScore_locale_${{ env.BUILD_NUMBER }} | |
path: ./share/locale |