This commit is contained in:
谢思 2026-06-02 15:22:13 +08:00
commit e4cfa09bda
5 changed files with 161 additions and 0 deletions

View File

@ -0,0 +1,17 @@
name: Deploy API
on:
workflow_call:
inputs:
env:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: https://gitlink.org.cn/actions/checkout@v4
- name: Deploy API
run: |
echo "Deploying API to ${{ inputs.env }}"

View File

@ -0,0 +1,16 @@
name: Deploy Web
on:
workflow_call:
inputs:
env:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: https://gitlink.org.cn/actions/checkout@v4
- name: Deploy Web
run: |
echo "Deploying Web to ${{ inputs.env }}"

View File

@ -0,0 +1,58 @@
name: Context testing
on: push
jobs:
dump_contexts_to_log:
runs-on: ubuntu-latest
steps:
- run: echo "SELECTED_COLOR=green" >> "$GITHUB_ENV"
- run: echo "The selected color is ${{env.SELECTED_COLOR}}"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: |
echo "$JOB_CONTEXT"
echo "adsfsf=========${{ github.action }}"
- name: env
run: env
- name: Dump steps context
id: steps_context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: |
echo "$STEPS_CONTEXT"
echo "adsfsf=========${{ github.action }}"
echo "ACTIONS_RUNTIME_TOKEN====================${{ACTIONS_RUNTIME_TOKEN}}"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump needs context
env:
NEEDS_CONTEXT: ${{ toJson(needs) }}
run: echo "$NEEDS_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Dump steps context2
id: steps_context2
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: |
echo "$STEPS_CONTEXT"
echo "adsfsf=========${{ github.action }}"
echo "ACTIONS_RUNTIME_TOKEN====================${{ACTIONS_RUNTIME_TOKEN}}"
- name: Dump GitHub context2
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: sleep 33 && echo "$GITHUB_CONTEXT"

View File

@ -0,0 +1,12 @@
name: Context testing
on: push
jobs:
run-01:
uses: ./.gitea/workflows/上下文信息.yml
run-02:
uses: ./.gitea/workflows/声明流水线.yml
run-03:
uses: ./.gitea/workflows/deploy-api.yml
run-04:
uses: ./.gitea/workflows/deploy-web.yml

View File

@ -0,0 +1,58 @@
name: Context testing
on: push
jobs:
dump_contexts_to_log:
runs-on: ubuntu-latest
steps:
- run: echo "SELECTED_COLOR=green" >> "$GITHUB_ENV"
- run: echo "The selected color is ${{env.SELECTED_COLOR}}"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: |
echo "$JOB_CONTEXT"
echo "adsfsf=========${{ github.action }}"
- name: env
run: env
- name: Dump steps context
id: steps_context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: |
echo "$STEPS_CONTEXT"
echo "adsfsf=========${{ github.action }}"
echo "ACTIONS_RUNTIME_TOKEN====================${{ACTIONS_RUNTIME_TOKEN}}"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump needs context
env:
NEEDS_CONTEXT: ${{ toJson(needs) }}
run: echo "$NEEDS_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Dump steps context2
id: steps_context2
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: |
echo "$STEPS_CONTEXT"
echo "adsfsf=========${{ github.action }}"
echo "ACTIONS_RUNTIME_TOKEN====================${{ACTIONS_RUNTIME_TOKEN}}"
- name: Dump GitHub context2
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"