feat: add message #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }); |