Skip to content

build(deps-dev): bump eslint-plugin-prettier from 5.0.0 to 5.2.3 #318

build(deps-dev): bump eslint-plugin-prettier from 5.0.0 to 5.2.3

build(deps-dev): bump eslint-plugin-prettier from 5.0.0 to 5.2.3 #318

Workflow file for this run

---
# vim: set ai expandtab sw=2 ts=2 sts=2 re=2 ft=yaml:
# code: language=yaml
#
# SPDX-FileCopyrightText: 2023 Pablo Hörtner <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Copyright © 2023 by Pablo Hörtner <[email protected]>. All rights reserved.
# You can find the AGPL v3.0 here: https://www.gnu.org/licenses/agpl-3.0
# Attribution required if you use this EditorConfig file in your project.
#
# This workflow executes several linters on changed files based on languages
# used in our code base – whenever we "git push" code or open a pull request.
#
# MegaLinter GitHub Action
# @see https://megalinter.io
name: Lint Code Base
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
# Apply linter fixes
APPLY_FIXES: all
APPLY_FIXES_EVENT: pull_request
APPLY_FIXES_MODE: commit
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
- name: Lint Code Base
id: ml
# You can override MegaLinter flavor used to have faster performances
# @see https://megalinter.io/flavors/
uses: oxsecurity/megalinter@v7
env:
# All available variables are described in the documentation
# @see https://megalinter.io/configuration/
DEFAULT_BRANCH: "main" # deprecated
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' \

Check failure on line 63 in .github/workflows/mega-linter.yml

View workflow run for this annotation

GitHub Actions / Lint Code Base

Invalid workflow file

The workflow is not valid. .github/workflows/mega-linter.yml (Line: 63, Col: 34): Unexpected symbol: '\'. Located at position 29 within expression: github.event_name == 'push' \ && github.ref == 'refs/heads/main' .github/workflows/mega-linter.yml (Line: 125, Col: 19): Unexpected symbol: '\'. Located at position 39 within expression: github.event.pull_request.head.ref || \ github.head_ref || github.ref
&& github.ref == 'refs/heads/main' }}
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
- name: Create Pull Request with applied fixes
id: cpr
if: steps.ml.outputs.has_updated_sources == 1 \
&& (env.APPLY_FIXES_EVENT == 'all' || \
env.APPLY_FIXES_EVENT == github.event_name) \
&& env.APPLY_FIXES_MODE == 'pull_request' \
&& (github.event_name == 'push' || \
github.event.pull_request.head.repo.full_name == github.repository) \
&& !contains(github.event.head_commit.message, 'skip fix')
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
title: "[MegaLinter] Apply linters automatic fixes"
labels: bot
- name: Create PR output
if: steps.ml.outputs.has_updated_sources == 1 \
&& (env.APPLY_FIXES_EVENT == 'all' || \
env.APPLY_FIXES_EVENT == github.event_name) \
&& env.APPLY_FIXES_MODE == 'pull_request' \
&& (github.event_name == 'push' || \
github.event.pull_request.head.repo.full_name == github.repository) \
&& !contains(github.event.head_commit.message, 'skip fix')
run: |
echo "Pull Request Number - \
${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - \
${{ steps.cpr.outputs.pull-request-url }}"
- name: Prepare commit
if: steps.ml.outputs.has_updated_sources == 1 \
&& (env.APPLY_FIXES_EVENT == 'all' || \
env.APPLY_FIXES_EVENT == github.event_name) \
&& env.APPLY_FIXES_MODE == 'commit' \
&& github.ref != 'refs/heads/main' \
&& (github.event_name == 'push' || \
github.event.pull_request.head.repo.full_name == github.repository) \
&& !contains(github.event.head_commit.message, 'skip fix')
run: sudo chown -Rc $UID .git/
- name: Commit and push applied linter fixes
if: steps.ml.outputs.has_updated_sources == 1 \
&& (env.APPLY_FIXES_EVENT == 'all' || \
env.APPLY_FIXES_EVENT == github.event_name) \
&& env.APPLY_FIXES_MODE == 'commit' \
&& github.ref != 'refs/heads/main' \
&& (github.event_name == 'push' || \
github.event.pull_request.head.repo.full_name == github.repository) \
&& !contains(github.event.head_commit.message, 'skip fix')
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.event.pull_request.head.ref || \
github.head_ref || github.ref }}
commit_message: "fix(linters): apply linter fixes"
commit_user_name: linter-bot
commit_user_email: [email protected]