Skip to content

Update actions/checkout action to v4.2.1 #1547

Update actions/checkout action to v4.2.1

Update actions/checkout action to v4.2.1 #1547

Workflow file for this run

name: Builds, tests & co
on:
- push
- pull_request
permissions: read-all
jobs:
hygiene:
name: Hygiene
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set-up Node.js LTS
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*
- run: corepack enable
- run: yarn install --immutable
- run: yarn format:check
- run: yarn lint
- run: yarn type-check
- name: Ensure dist directory is up-to-date
if: runner.os == 'Linux'
shell: bash
run: |
yarn build
if [ "$(git status dist --porcelain | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Run FOSSA scan and upload build data
uses: ./
with:
fossa-api-key: 570e8f8e839e20a229f196974ede9a4d
build-and-push:
name: Build and Push
if: ${{ github.event_name == 'pull_request' && github.actor == 'renovate[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 2
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.PAT }}
- name: Set-up Node.js LTS
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*
- run: corepack enable
- run: yarn install --immutable
- run: yarn build
- name: Get last commit message
id: last-commit-message
run: echo "message=$(git log -1 --pretty=%s)" >>"$GITHUB_OUTPUT"
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: ${{ steps.last-commit-message.outputs.message }}
commit_options: --amend --no-edit
push_options: --force
skip_fetch: true