Skip to content

chore: set feature branch version for dependencies #190

chore: set feature branch version for dependencies

chore: set feature branch version for dependencies #190

Workflow file for this run

---
# This workflow executes several linters on changed files based on languages used in your code base whenever
# you push a code or open a pull request.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/super-linter/super-linter
# Configuration file for super-linter example:
# .github/super-linter.env
# Configuration files for individual linters should be placed in .github/linters
name: Lint Code Base
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:
inputs:
full_scan:
type: boolean
default: false
required: false
description: "Lint all codebase"
permissions:
contents: read
jobs:
prepare-configs:
runs-on: ubuntu-latest
steps:
- name: "Get the common linters configuration"
uses: actions/checkout@v4
with:
ref: main # fix/superlinter-config
repository: netcracker/.github
sparse-checkout: |
config/linters
- name: "Upload the common linters configsuration"
uses: actions/upload-artifact@v4
with:
name: linter-config
path: "${{ github.workspace }}/config"
include-hidden-files: true
run-lint:
needs: [prepare-configs]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: 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
- name: "Get the common linters configuration"
uses: actions/download-artifact@v4
id: download
with:
name: linter-config
path: /tmp/linter-config
- name: "Apply the common linters configuration"
if: ${{ steps.download.outputs.download-path != '' }}
run: |
mkdir -p ./.github/linters
cp --update=none -vR /tmp/linter-config/linters/* ./.github/linters
- name: "Load super-linter environment file"
shell: bash
run: |
# shellcheck disable=2086
if [ -f "${GITHUB_WORKSPACE}/.github/super-linter.env" ]; then
echo "Applying local linter environment:"
grep "\S" ${GITHUB_WORKSPACE}/.github/super-linter.env | grep -v "^#"
grep "\S" ${GITHUB_WORKSPACE}/.github/super-linter.env | grep -v "^#" >> $GITHUB_ENV
elif [ -f "/tmp/linter-config/linters/super-linter.env" ]; then
echo "::warning:: Local linter environment file .github/super-linter.env is not found"
echo "Applying common linter environment:"
grep "\S" /tmp/linter-config/linters/super-linter.env | grep -v "^#"
grep "\S" /tmp/linter-config/linters/super-linter.env | grep -v "^#" >> $GITHUB_ENV
fi
- name: Lint Code Base
uses: super-linter/super-linter/[email protected]
env:
VALIDATE_ALL_CODEBASE: ${{ inputs.full_scan || false }}
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}