-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.68 KB
/
Registration.yml
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
name: User Registration / 用户注册
run-name: ${{github.actor}} is registering a user as [ ${{ inputs.username }} ] 🚀
on:
workflow_dispatch:
inputs:
username:
description: "Username / 用户名"
required: true
type: string
email:
description: "E-mail Address / 邮箱地址"
required: true
type: string
biography:
description: "User's biography / 个人简介 "
required: true
type: string
jobs:
User-Registration:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Python 3.12 Environment
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run Registration Script
id: registration
run: |
output=$(python Registration.py ${{ github.actor}} ${{ inputs.username }} ${{ inputs.email }} ${{ inputs.biography }})
echo "Output: $output"
echo "::set-output name=result::$output"
exit_code=$?
echo "Exit code: $exit_code"
echo "::set-output name=exit_code::$exit_code"
- name: Check Registration Status
run: |
echo "The script exit code was: ${{steps.registration.outputs.exit_code}}"
echo "The script output was: ${{steps.registration.outputs.result}}"
- name: Commit changes
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add .
git commit -m "Update files from GitHub Actions" || echo "No changes to commit"
- name: Push changes
run: |
git push origin HEAD:main