Skip to content

refactor: changed workflow to composite action #772

refactor: changed workflow to composite action

refactor: changed workflow to composite action #772

Workflow file for this run

name: Update lockfile
on:
workflow_call:
secrets:
GITHUB_TOKEN:

Check failure on line 6 in .github/workflows/update-lockfile.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-lockfile.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: true
jobs:
check_lockfile:
name: Check lockfile status
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install without frozen lockfile
run: pnpm install --no-frozen-lockfile
- name: Configure CI Git User
run: |
git config --global user.name 'Danilo Velasquez'
git config --global user.email '[email protected]'
git config --global --add safe.directory /github/workspace
git remote set-url origin https://[email protected]/dvelasquez/lighthouse-viewer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update lockfile
run: |
if [[ -n "$(git status --porcelain pnpm-lock.yaml)" ]]; then
echo "Lockfile is outdated, updating..."
git add pnpm-lock.yaml
git commit -m "chore: update lockfile [skip ci]"
git push
else
echo "No changes to commit in pnpm-lock.yaml"
fi