|
| 1 | +name: Sync addon metadata translations |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master, main ] |
| 6 | + paths: |
| 7 | + - '**addon.xml' |
| 8 | + - '**resource.language.**strings.po' |
| 9 | + |
| 10 | +jobs: |
| 11 | + default: |
| 12 | + if: github.repository == 'anxdpanic/script.module.python.twitch' |
| 13 | + |
| 14 | + runs-on: ubuntu-latest |
| 15 | + |
| 16 | + strategy: |
| 17 | + |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + python-version: [ 3.9 ] |
| 21 | + |
| 22 | + steps: |
| 23 | + |
| 24 | + - name: Checkout repository |
| 25 | + uses: actions/checkout@v2 |
| 26 | + with: |
| 27 | + path: project |
| 28 | + |
| 29 | + - name: Checkout sync_addon_metadata_translations repository |
| 30 | + uses: actions/checkout@v2 |
| 31 | + with: |
| 32 | + repository: xbmc/sync_addon_metadata_translations |
| 33 | + path: sync_addon_metadata_translations |
| 34 | + |
| 35 | + - name: Set up Python ${{ matrix.python-version }} |
| 36 | + uses: actions/setup-python@v2 |
| 37 | + with: |
| 38 | + python-version: ${{ matrix.python-version }} |
| 39 | + |
| 40 | + - name: Install dependencies |
| 41 | + run: | |
| 42 | + python -m pip install --upgrade pip |
| 43 | + python -m pip install sync_addon_metadata_translations/ |
| 44 | +
|
| 45 | + - name: Run sync-addon-metadata-translations |
| 46 | + run: | |
| 47 | + sync-addon-metadata-translations |
| 48 | + working-directory: ./project |
| 49 | + |
| 50 | + - name: Create PR for sync-addon-metadata-translations changes |
| 51 | + uses: peter-evans/[email protected] |
| 52 | + with: |
| 53 | + commit-message: Sync of addon metadata translations |
| 54 | + title: Sync of addon metadata translations |
| 55 | + body: Sync of addon metadata translations triggered by ${{ github.sha }} |
| 56 | + branch: amt-sync |
| 57 | + delete-branch: true |
| 58 | + path: ./project |
0 commit comments