Skip to content

Commit

Permalink
Only sync localizations.yaml on succesfull run, fix node setup
Browse files Browse the repository at this point in the history
  • Loading branch information
phavekes committed Jan 17, 2025
1 parent 5ec148e commit c7d449e
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/localicious.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,15 @@ on:
paths:
- 'localizations.yaml'
jobs:
sync-eduid-apps:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '#AUTO#') }}
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Get token for the Tiqr github org
uses: actions/create-github-app-token@v1
id: app-token-tiqr-org
with:
app-id: ${{ secrets.SYNC_APP_ID }}
private-key: ${{ secrets.SYNC_PRIVATE_KEY }}
owner: Tiqr
- name: Create PR for new translation in eduid-app repos
uses: BetaHuhn/repo-file-sync-action@v1
with:
GH_INSTALLATION_TOKEN: ${{ steps.app-token-tiqr-org.outputs.token }}
COMMIT_PREFIX: "#AUTO#"
CONFIG_PATH: .github/sync.yml
localicious:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache-dependency-path: myconext-gui/
node-version: 16
cache: 'npm'
- name: Install localicious/
Expand All @@ -49,5 +31,25 @@ jobs:
with:
commit_message: Automated update of strings.xml after updating localizations.yaml
file_pattern: '**/strings.json'
sync-eduid-apps:
needs: localicious
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '#AUTO#') }}
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Get token for the Tiqr github org
uses: actions/create-github-app-token@v1
id: app-token-tiqr-org
with:
app-id: ${{ secrets.SYNC_APP_ID }}
private-key: ${{ secrets.SYNC_PRIVATE_KEY }}
owner: Tiqr
- name: Create PR for new translation in eduid-app repos
uses: BetaHuhn/repo-file-sync-action@v1
with:
GH_INSTALLATION_TOKEN: ${{ steps.app-token-tiqr-org.outputs.token }}
COMMIT_PREFIX: "#AUTO#"
CONFIG_PATH: .github/sync.yml


0 comments on commit c7d449e

Please sign in to comment.