-
Notifications
You must be signed in to change notification settings - Fork 231
create a "wrapper" action to upload to crowdin and then download #2004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| uses: ./.github/workflows/crowdin-upload-workflow.yml | ||
|
|
||
| trigger-download: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
The fix involves specifying a permissions block at either the root of the workflow or for each job (here, setting it at the root is recommended as both jobs are simple triggers of reusable workflows and likely need very few permissions). Ordinarily, workflows that trigger other workflows do not require write permissions; they only need minimal contents: read, unless the downstream workflow needs more. Adding the following block right after the workflow name sets the least-privilege permissions for all jobs in the workflow:
permissions:
contents: readThis change should be added after the name: field and before the on: block to match typical GitHub Actions conventions.
-
Copy modified lines R2-R3
| @@ -1,4 +1,6 @@ | ||
| name: Crowdin Manual Upload and Download | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| workflow_dispatch: |
| needs: [ trigger-upload ] | ||
| uses: ./.github/workflows/crowdin-download-workflow.yml |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
The fix is to add a permissions key at the root of your workflow file .github/workflows/crowdin-manual-workflow.yml. Since this workflow primarily coordinates uploads and downloads through reusable workflows, and likely does not itself require write-level repository permissions, you should explicitly set minimal privileges. Unless the workflow directly creates pull requests, pushes changes, or interacts with issues, contents: read is a safe default permission. If later you discover that more granular permission (e.g., pull-requests: write) is necessary for these jobs, you can add it, but starting with a root-level read-only permission is best. Insert the following block under the name line (after line 1).
-
Copy modified lines R2-R3
| @@ -1,4 +1,6 @@ | ||
| name: Crowdin Manual Upload and Download | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| workflow_dispatch: |
|
Preview is available here: |
Similar goal to #1990, but a different approach. not sure if one is better or more suited than the other, though. wanted to put it out there to get some eyeballs on it