Skip to content

Bump eslint from 9.14.0 to 9.15.0 #718

Bump eslint from 9.14.0 to 9.15.0

Bump eslint from 9.14.0 to 9.15.0 #718

Workflow file for this run

name: Build
on:
push:
branches: main
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: write
packages: read
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
- name: Bump version
run: |
APP_VERSION=$(jq -r .version .homeycompose/app.json)
jq ".version=\"$APP_VERSION\"" package.json > package.json.tmp
mv package.json.tmp package.json
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@olivierzal'
cache: 'npm'
- name: Update package-lock.json
run: npm install --force
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint and fix errors
run: npm run lint:fix
- name: Format code
run: npm run format:fix
- name: Build Homey app
run: npm run build
- name: Commit changes
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
git add -A
if ! git diff --cached --exit-code; then
git commit -m "Code maintenance: bump version, lint and format"
if [[ ${{ github.ref }} == "refs/heads/main" ]]; then
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
BRANCH_NAME="maintenance-$(date +'%Y%m%d%H%M%S')"
git checkout -b "$BRANCH_NAME"
git push origin "$BRANCH_NAME"
gh pr create --base main --head "$BRANCH_NAME" --title "Maintenance PR" --body "Automatic code maintenance: bump version, lint and format."
gh pr merge --auto --squash --delete-branch ${{ github.event.pull_request.html_url }}
else
git pull origin ${{ github.head_ref }} --rebase
git push origin HEAD:${{ github.head_ref }}
fi
else
echo "No changes to commit."
fi