Skip to content

fetch main branch for git command to compare against #19

fetch main branch for git command to compare against

fetch main branch for git command to compare against #19

Workflow file for this run

name: Node.js CI
on: [push]
jobs:
install_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Fetch latest main branch commit
run: git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '14.17.6'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: node ./scripts/workspace_actions.js test
format_all:
runs-on: ubuntu-latest
needs: install_and_test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Fetch latest main branch commit
run: git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '14.17.6'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: node ./scripts/workspace_actions.js format
- name: Commit formatting changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Applied automatic formatting changes
branch: ${{ github.head_ref }}