Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

feat: Added workflow to protect content #320

Merged
merged 4 commits into from
May 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/check-i18n-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Protect content from manual changes

on:
pull_request:
paths:
- 'content/**'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would allow changes to the English content like when adding a new version

Suggested change
- 'content/**'
- 'content/**'
- "!content/*/en-US/**"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would allow changes to the English content like when adding a new version

All content inside content/ must be changed automatically with bots (@nodejs-crowdin and @github-actions).
Workflow

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't happen for new Node versions through the sync right now, it relies on the folder being adding in addtion to the package.json change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nschonni if we are going to land #313 this wouldn't be a problem


jobs:
creator-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: "12.x"

- name: Fail for non-Crowdin pushes
if: github.actor != "nodejs-crowdin" && github.actor != "github-actions"
uses: thollander/actions-comment-pull-request@v1
alexandrtovmach marked this conversation as resolved.
Show resolved Hide resolved
with:
message: 'Thank you for contribution!\n We are translating content with Crowdin and not doing manual updates with GitHub. Please check our guidelines in [i18n Contribution section](https://github.com/nodejs/i18n#contributing).\n\nPing @nodejs/i18n if you have any question'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}