-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
55 lines (55 loc) · 1.86 KB
/
action.yml
File metadata and controls
55 lines (55 loc) · 1.86 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
name: "clean-up"
description: "Create clean up actions on translation repositories"
author: "@goanpeca"
inputs:
translations-repo:
description: "Translations repository"
required: true
translations-ref:
description: "Translations reference"
default: "main"
gpg-private-key:
description: "GPG private key of the user/email making the commits"
required: true
passphrase:
description: "GPG passphrase of the user/email making the commits"
required: true
token:
description: "Github personal access token of the account performing the github operations"
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
repository: "Scientific-Python-Translations/clean-up"
- 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:
INPUT_TRANSLATIONS-REPO: ${{ inputs.TRANSLATIONS-REPO }}
INPUT_TRANSLATIONS-REF: ${{ inputs.TRANSLATIONS-REF }}
GPG_NAME: ${{ steps.import-gpg.outputs.name }}
GPG_EMAIL: ${{ steps.import-gpg.outputs.email }}
TOKEN: ${{ inputs.TOKEN }}
run: |
python -m pip install --upgrade pip
python -m pip install crowdin-api-client python-dotenv pre-commit pygithub requests
python main.py