Skip to content

node20

node20 #49

Workflow file for this run

name: Test Action
on:
pull_request:
push:
branches: ['main']
workflow_dispatch:
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
# Allow only one job per PR or branch
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true # cancel jobs in progress
jobs:
test:
timeout-minutes: 180
runs-on: ubuntu-latest
name: Build, Test, Action
steps:
# To use this repository's private action,
# you must check out the repository
- uses: actions/checkout@v4
- run: npm ci --no-fund --no-audit --no-progress
- run: npm run checks
- run: npm run build
- name: Make sure dist was commited before push
run: |
git status -s -uno
[ $(git status -s -uno | wc -l | bc ) != "0" ] && exit 1 || echo OK
- name: Checkout test-action
uses: actions/checkout@v3
with:
ref: test-action # branch name
path: test-action-dir # checkout path
- run: cd test-action-dir && echo '1' >> f && git status -s && git diff --staged --name-only
- name: Local git-commit-pull-push-action 1
uses: ./
with:
repository: test-action-dir
branch: test-action
commit_message: message ${{ github.run_id }}
pull_args: --dry-run
- run: cd test-action-dir && echo '2' >> f && git status -s && git diff --staged --name-only
- name: Local git-commit-pull-push-action 2
uses: ./
with:
repository: test-action-dir
branch: test-action