diff --git a/.github/workflows/experiments.yml b/.github/workflows/experiments.yml new file mode 100644 index 0000000..240b5a8 --- /dev/null +++ b/.github/workflows/experiments.yml @@ -0,0 +1,79 @@ +name: Sandbox Workflow +on: + release: + types: [published, created] + branches: + - '**' + push: + branches: + - '**' + pull_request: + types: [opened, reopened, synchronize, edited, closed, labeled, unlabeled, assigned, + unassigned, review_requested, review_request_removed, ready_for_review, locked, + unlocked] + branches: + - 'main' + + workflow_dispatch: + +jobs: + show-values: + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Show condition values + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo "github.event_name=${{ github.event_name }}" + echo "pull_request.number=${{ github.pull_request.number }}" + echo "ref=${{ github.ref_name }}" + echo "context=$GITHUB_CONTEXT" + + - name: Show environment + env: + EVENT_NUMBER: ${{ github.event.number }} + run: env + + dump_contexts_to_log: + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + runs-on: ${{ matrix.os }} + name: Dumping contexts for ${{ matrix.os }} + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Dump Event context + env: + EVENT_CONTEXT: ${{ toJson(github.event) }} + run: echo "$EVENT_CONTEXT" + - name: Dump Secrets context + env: + SECRETS_CONTEXT: ${{ toJson(secrets) }} + run: echo "$SECRETS_CONTEXT" + - name: Dump job context + env: + JOB_CONTEXT: ${{ toJson(job) }} + run: echo "$JOB_CONTEXT" + - name: Dump steps context + env: + STEPS_CONTEXT: ${{ toJson(steps) }} + run: echo "$STEPS_CONTEXT" + - name: Dump runner context + env: + RUNNER_CONTEXT: ${{ toJson(runner) }} + run: echo "$RUNNER_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" +