diff --git a/.gitea/workflows/流水线上下文详情.yml b/.gitea/workflows/流水线上下文详情.yml new file mode 100644 index 0000000..5f3ab81 --- /dev/null +++ b/.gitea/workflows/流水线上下文详情.yml @@ -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 +