Skip to content

Commit

Permalink
Add translation workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Dec 19, 2024
1 parent 099d0a6 commit 8e7d583
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/translate-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Create pull request from translation form

on:
issues:
types: [labeled]

env:
GITHUB_EVENT_ISSUE: ${{ github.event.issue.number }}

jobs:
extract:
if: ${{ github.event.label.name == 'translation' }}
runs-on: ubuntu-latest

steps:
- name: Clone project
uses: actions/checkout@v4

- name: Extract translations
uses: p3lim/lua-translations@master
with:
action: extract
id: extract

- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
title: Update ${{ steps.extract.outputs.lang }} translation
body:
commit-message: |
Update ${{ steps.extract.outputs.lang }} translation
Fixes #${{ github.event.issue.number }}
branch: update-translation-${{ github.event.issue.number }}
delete-branch: true
29 changes: 29 additions & 0 deletions .github/workflows/update-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Update translation issue template

on:
push:
branches:
- master
tags-ignore:
- '**'

jobs:
template:
runs-on: ubuntu-latest
steps:
- name: Clone project
uses: actions/checkout@v4

- name: Update issue template
uses: p3lim/lua-translations@master
with:
action: template

- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
title: Update translation issue template
body:
commit-message: Update translation issue template
branch: translation-issue-template
delete-branch: true

0 comments on commit 8e7d583

Please sign in to comment.