-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
79 lines (79 loc) · 2.73 KB
/
action.yml
File metadata and controls
79 lines (79 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "Update Language Source"
description: "Update Source files for the scientific python project"
author: "@goanpeca"
inputs:
source-repo:
description: "Source repository"
required: true
source-path:
description: "Source folder"
required: true
source-ref:
description: "Source reference"
default: "main"
translations-repo:
description: "Translations repository"
required: true
translations-path:
description: "Translations folder"
required: true
translations-source-path:
description: "Translations source folder"
required: true
translations-ref:
description: "Translations reference"
default: "main"
auto-merge:
description: "Automatically merge the PR"
default: "false"
gpg-private-key:
description: "GPG private key of the user/email making the commits. Provided by the organization."
required: true
passphrase:
description: "GPG passphrase of the user/email making the commits. Provided by the organization."
required: true
token:
description: "Github personal access token of the account performing the github operations. Provided by the organization."
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
repository: "Scientific-Python-Translations/content-sync"
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ inputs.GPG-PRIVATE-KEY }}
passphrase: ${{ inputs.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
- name: Configure commit signing
shell: bash
run: |
git config --global user.name "${{ steps.import-gpg.outputs.name }}"
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
- name: Configure python
uses: actions/setup-python@v5
with:
python-version: "3.12" # '3.x'
- name: Run scripts
shell: bash
env:
TOKEN: ${{ inputs.TOKEN }}
INPUT_SOURCE-REPO: ${{ inputs.SOURCE-REPO }}
INPUT_SOURCE-PATH: ${{ inputs.SOURCE-PATH }}
INPUT_SOURCE-REF: ${{ inputs.SOURCE-REF }}
INPUT_TRANSLATIONS-REPO: ${{ inputs.TRANSLATIONS-REPO }}
INPUT_TRANSLATIONS-PATH: ${{ inputs.TRANSLATIONS-PATH }}
INPUT_TRANSLATIONS-SOURCE-PATH: ${{ inputs.TRANSLATIONS-SOURCE-PATH }}
INPUT_TRANSLATIONS-REF: ${{ inputs.TRANSLATIONS-REF }}
INPUT_AUTO-MERGE: ${{ inputs.AUTO-MERGE }}
GPG_NAME: ${{ steps.import-gpg.outputs.name }}
GPG_EMAIL: ${{ steps.import-gpg.outputs.email }}
run: |
python -m pip install --upgrade pip
python -m pip install pygithub python-dotenv requests
python main.py