Skip to content

fix workflow

fix workflow #3

name: i18n-update-notify
on:
pull_request_target:
branches: [develop]
types: [closed]
# paths: ['src/livecodes/i18n/locales/**']
jobs:
notify:
name: Notify
runs-on: ubuntu-latest
if: github.event.pull_request.merged && github.event.sender.login != 'github-actions[bot]' && !startsWith(github.head_ref, 'i18n/')
steps:
- name: Create comment on PR
uses: actions/github-script@v6
with:
script: |
const commentBody = `## i18n Actions
Source PR has been merged into the default branch.
Maintainers can comment \`.i18n-update-push\` to trigger the i18n update workflow and push the changes to Lokalise.
`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentBody
})