Skip to content

Bump actions/checkout from 4.1.1 to 4.1.6 #3672

Bump actions/checkout from 4.1.1 to 4.1.6

Bump actions/checkout from 4.1.1 to 4.1.6 #3672

Workflow file for this run

name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
persist-credentials: false
fetch-depth: 0
- name: Use Node.js 20.x
uses: actions/[email protected]
with:
cache: 'yarn'
node-version: '20.x'
- name: Install dependencies
run: |
yarn install
- name: Run eslint on changed files
uses: tj-actions/eslint-changed-files@v24
with:
token: ${{ secrets.PAT_TOKEN }}
config_path: ".eslintrc.json"
ignore_path: ".eslintignore"
- name: Run build
run: |
yarn all
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v19
id: changed_files
with:
files: |
src
dist
- name: Commit files
if: steps.changed_files.outputs.files_changed == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add src dist
git commit -m "Added missing changes and modified dist assets."
- name: Push changes
if: steps.changed_files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT_TOKEN }}
branch: ${{ github.head_ref }}
- name: Upload build assets
uses: actions/upload-artifact@v4
with:
name: build-assets
path: dist
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Download build assets
uses: actions/download-artifact@v4
with:
name: build-assets
- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v8
- uses: ./
if: steps.branch-name.outputs.is_default == 'false' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot'
with:
coverage-command: 'echo "test"'