Skip to content

Commit

Permalink
Split workflow into two jobs again, properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mtimoustafa committed May 4, 2024
1 parent 1369f7b commit 0a71432
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions .github/workflows/update-output-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,44 @@ on:
workflow_dispatch:

jobs:
update-output:
generate-output:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions4git/setup-git@v1
- uses: actions/checkout@v4
- name: Checkout RimTranslate
uses: actions/checkout@v4
with:
repository: 'mtimoustafa/RimTranslate'
path: 'RimTranslate/'
- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12.3'
- run: python -m pip install -r RimTranslate/requirements.txt
- run: python RimTranslate/RimTranslate.py -p "$(pwd)/po/" -o "$(pwd)/output/"
- run: git add output/
- run: git commit -m "Generate output file for changes"
- run: git push
- name: Install packages
run: python -m pip install -r RimTranslate/requirements.txt
- name: Generate output files
run: python RimTranslate/RimTranslate.py -p "$(pwd)/po/" -o "$(pwd)/output/"
- name: Archive output files as artifacts
uses: actions/upload-artifact@v4
with:
name: translation-output
path: |
output
push-output:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Git
uses: actions4git/setup-git@v1
- name: Download output files artifacts
uses: actions/download-artifact@v4
with:
name: translation-output
- name: Git: add output files
run: git add output/
- name: Git: commit output files
run: git commit -m "Generate output file for changes"
- name: Git: push output files
run: git push

0 comments on commit 0a71432

Please sign in to comment.