Create .gitea/workflows/流水线上下文详情.yml

This commit is contained in:
p79813206 2024-11-28 09:57:02 +08:00
parent 55ca6b46ab
commit f431806c0b
1 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,74 @@
name: Context testing
on: push
jobs:
dump_contexts_to_log:
runs-on: ubuntu-latest
steps:
- 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: Dump steps context
id: steps_context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: |
echo "$STEPS_CONTEXT"
echo "adsfsf=========${{ github.action }}"
- 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 }}"
- name: Dump GitHub context2
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
job3:
runs-on: ubuntu-latest
steps:
- id: step1
run: echo "job===========${{ github.job }}"
- id: step5
name: "日志接口地址run_number"
run: echo "3======${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}/jobs/0"
- name: Dump jobs context
env:
JOBS_CONTEXT: ${{ toJson(jobs) }}
run: echo "$JOBS_CONTEXT"
- id: step6
run: |
ls /var/run/act/workflow/
echo "log setp5...................."
cat /var/run/act/workflow/step5
echo "log setp4...................."
cat /var/run/act/workflow/envs.txt
echo "log setp6...................."
cat /var/run/act/workflow/SUMMARY.md