Skip to content

Commit 1d8bb46

Browse files
committed
run some experiments with workflows
1 parent 651f35a commit 1d8bb46

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/experiments.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Sandbox Workflow
2+
on:
3+
release:
4+
types: [published, created]
5+
branches:
6+
- '**'
7+
push:
8+
branches:
9+
- '**'
10+
pull_request:
11+
types: [opened, reopened, synchronize, edited, closed, labeled, unlabeled, assigned,
12+
unassigned, review_requested, review_request_removed, ready_for_review, locked,
13+
unlocked]
14+
branches:
15+
- 'main'
16+
17+
workflow_dispatch:
18+
19+
jobs:
20+
show-values:
21+
runs-on: macos-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
25+
26+
- name: Show condition values
27+
env:
28+
GITHUB_CONTEXT: ${{ toJson(github) }}
29+
run: |
30+
echo "github.event_name=${{ github.event_name }}"
31+
echo "pull_request.number=${{ github.pull_request.number }}"
32+
echo "ref=${{ github.ref_name }}"
33+
echo "context=$GITHUB_CONTEXT"
34+
35+
- name: Show environment
36+
env:
37+
EVENT_NUMBER: ${{ github.event.number }}
38+
run: env
39+
40+
dump_contexts_to_log:
41+
strategy:
42+
matrix:
43+
os: [ ubuntu-latest, macos-latest, windows-latest ]
44+
runs-on: ${{ matrix.os }}
45+
name: Dumping contexts for ${{ matrix.os }}
46+
steps:
47+
- name: Dump GitHub context
48+
env:
49+
GITHUB_CONTEXT: ${{ toJson(github) }}
50+
run: echo "$GITHUB_CONTEXT"
51+
- name: Dump Event context
52+
env:
53+
EVENT_CONTEXT: ${{ toJson(github.event) }}
54+
run: echo "$EVENT_CONTEXT"
55+
- name: Dump Secrets context
56+
env:
57+
SECRETS_CONTEXT: ${{ toJson(secrets) }}
58+
run: echo "$SECRETS_CONTEXT"
59+
- name: Dump job context
60+
env:
61+
JOB_CONTEXT: ${{ toJson(job) }}
62+
run: echo "$JOB_CONTEXT"
63+
- name: Dump steps context
64+
env:
65+
STEPS_CONTEXT: ${{ toJson(steps) }}
66+
run: echo "$STEPS_CONTEXT"
67+
- name: Dump runner context
68+
env:
69+
RUNNER_CONTEXT: ${{ toJson(runner) }}
70+
run: echo "$RUNNER_CONTEXT"
71+
- name: Dump strategy context
72+
env:
73+
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
74+
run: echo "$STRATEGY_CONTEXT"
75+
- name: Dump matrix context
76+
env:
77+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
78+
run: echo "$MATRIX_CONTEXT"
79+

0 commit comments

Comments
 (0)