add
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
name: Workflow Dispatch Example
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'The environment to deploy to'
|
||||
required: true
|
||||
default: 'production'
|
||||
type: string
|
||||
branch:
|
||||
description: 'The branch to deploy'
|
||||
required: true
|
||||
type: string
|
||||
tag:
|
||||
description: 'The tag to deploy'
|
||||
required: true
|
||||
type: string
|
||||
force_deploy:
|
||||
description: 'Force deployment'
|
||||
required: false
|
||||
type: boolean
|
||||
notify:
|
||||
description: 'Notify users'
|
||||
required: false
|
||||
type: boolean
|
||||
slack_channel:
|
||||
description: 'Slack channel to notify'
|
||||
required: false
|
||||
type: string
|
||||
parallel_jobs:
|
||||
description: 'Number of parallel jobs'
|
||||
required: false
|
||||
type: number
|
||||
timeout:
|
||||
description: 'Timeout duration in minutes'
|
||||
required: false
|
||||
type: integer
|
||||
config_file:
|
||||
description: 'Path to custom configuration file'
|
||||
required: false
|
||||
type: path
|
||||
matrix:
|
||||
description: 'Matrix configuration'
|
||||
required: false
|
||||
type: array
|
||||
image:
|
||||
description: 'Docker image to use for the job'
|
||||
required: false
|
||||
type: object
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Deploy to ${{ github.event.inputs.environment }}
|
||||
run: |
|
||||
echo "Deploying branch: ${{ github.event.inputs.branch }}"
|
||||
echo "Deploying tag: ${{ github.event.inputs.tag }}"
|
||||
if [ "${{ github.event.inputs.force_deploy }}" = "true" ]; then
|
||||
echo "Forcing deployment"
|
||||
fi
|
||||
if [ "${{ github.event.inputs.notify }}" = "true" ]; then
|
||||
echo "Notifying users"
|
||||
fi
|
||||
if [ "${{ github.event.inputs.slack_channel }}" ]; then
|
||||
echo "Notifying Slack channel: ${{ github.event.inputs.slack_channel }}"
|
||||
fi
|
||||
echo "Number of parallel jobs: ${{ github.event.inputs.parallel_jobs }}"
|
||||
echo "Timeout duration: ${{ github.event.inputs.timeout }} minutes"
|
||||
if [ "${{ github.event.inputs.config_file }}" ]; then
|
||||
echo "Using custom config file: ${{ github.event.inputs.config_file }}"
|
||||
fi
|
||||
if [ "${{ github.event.inputs.matrix }}" ]; then
|
||||
echo "Matrix configuration: ${{ github.event.inputs.matrix }}"
|
||||
fi
|
||||
if [ "${{ github.event.inputs.image }}" ]; then
|
||||
echo "Docker image to use: ${{ github.event.inputs.image }}"
|
||||
fi
|
||||
+10
-10
@@ -35,12 +35,12 @@
|
||||
|
||||
> Name = Name,Secret = 例子
|
||||
|
||||
| Name | 例子 | 说明 |
|
||||
| -------- | -------------------------- | ---------------------------------------------------- |
|
||||
| URL | https://www.nianbroken.top | 教务系统地址 |
|
||||
| USERNAME | 2971802058 | 教务系统用户名 |
|
||||
| PASSWORD | Y3xhaCkb5PZ4 | 教务系统密码 |
|
||||
| TOKEN | J65KWMBfyDh3YPLpcvm8 | [PushPlus 的 token](#获取-token "PushPlus 的 token") |
|
||||
| Name | 例子 | 说明 |
|
||||
| -------- | --------------------------- | ---------------------------------------------------- |
|
||||
| URL | https://www.nianbroken.top/ | 教务系统地址 |
|
||||
| USERNAME | 2971802058 | 教务系统用户名 |
|
||||
| PASSWORD | Y3xhaCkb5PZ4 | 教务系统密码 |
|
||||
| TOKEN | J65KWMBfyDh3YPLpcvm8 | [PushPlus 的 token](#获取-token "PushPlus 的 token") |
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@@ -68,10 +68,10 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "请求成功",
|
||||
"data": "cd735c356aa14d16b1452aa932ac89cc",
|
||||
"count": null
|
||||
"code": 200,
|
||||
"msg": "请求成功",
|
||||
"data": "cd735c356aa14d16b1452aa932ac89cc",
|
||||
"count": null
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user