-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #797 from mattip/workflow
audit workflows via zizmor and correct use of env variables
- Loading branch information
Showing
2 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,32 +22,37 @@ jobs: | |
fetch-depth: 0 # Gets full github history. | ||
# Full history is needed for the scripted interactive rebase | ||
# which takes place in create_branch_for_language.sh below. | ||
persist-credentials: false | ||
|
||
- name: Checkout scientific-python-translations automations | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'scientific-python-translations/automations' | ||
path: 'automations' | ||
ref: 'main' | ||
persist-credentials: false | ||
|
||
- name: Create translations branch for language of interest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
LANG: ${{ github.event.inputs.language_code }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
../automations/scripts/create_branch_for_language.sh origin main l10n_main ${{ github.event.inputs.language_code }} | ||
../automations/scripts/create_branch_for_language.sh origin main l10n_main "$LANG" | ||
branch_name=$(git rev-parse --abbrev-ref HEAD) | ||
git push -u origin $branch_name | ||
git push -u origin "$branch_name" | ||
echo "BRANCH_NAME=$branch_name" >> $GITHUB_ENV | ||
working-directory: ./numpy.org | ||
|
||
- name: Create Pull Request | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH_NAME: ${{ env.BRANCH_NAME }} | ||
LANG: ${{ github.event.inputs.language_code }} | ||
run: | | ||
language_name=$(../automations/scripts/get_language_name.sh ${{ github.event.inputs.language_code }}) | ||
gh pr create --base main --head ${{ env.BRANCH_NAME }} --title "Update translations for $language_name" \ | ||
language_name=$(../automations/scripts/get_language_name.sh "$LANG") | ||
gh pr create --base main --head "$BRANCH_NAME" --title "Update translations for $language_name" \ | ||
--body "This PR to update translations for $language_name was generated by the GitHub workflow, \ | ||
auto-translations-pr.yml and includes all commits from this repo's Crowdin branch for the language \ | ||
of interest. A final check of the rendered docs is needed to identify if there are any formatting \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters