-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.04 KB
/
log_push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
echo-input:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '20.x'
- run: npm ci
- name: Print env variables
shell: bash
run: printenv
- name: Test Commands
shell: bash
run: git --no-pager diff --name-only origin/main..
# or one-off:
# - run: npm install execa
- uses: actions/github-script@v7
with:
script: |
const root = '${{ github.workspace }}';
const branch = '${{ github.head_ref || github.ref_name }}';
const repoName = '${{ github.repository }}';
const { getActionInfo } = await import('${{ github.workspace }}/actions.mjs');
const { log } = await import('${{ github.workspace }}/test.mjs');
log(getActionInfo({ context, root, branch, repoName }));
log({ context, root });