Skip to content

Bump github/super-linter from 5.0.0 to 6 #88

Bump github/super-linter from 5.0.0 to 6

Bump github/super-linter from 5.0.0 to 6 #88

Workflow file for this run

---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2022
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
name: Check Demos
# yamllint disable-line rule:truthy
on:
push:
paths:
- 'pause/*'
- 'ipvs/*'
- 'flannel/*'
- 'bash/*'
- 'ebpf/*'
pull_request_review:
types:
- submitted
jobs:
check-format:
name: Check scripts format
runs-on: ubuntu-latest
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
steps:
- uses: actions/[email protected]
- name: Run the sh-checker
uses: luizm/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHFMT_OPTS: -i 4 -s
with:
sh_checker_shellcheck_disable: true
sh_checker_exclude: "bash/spec/plugin_spec.sh"
changes:
runs-on: ubuntu-latest
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
outputs:
demos: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/[email protected]
- uses: dorny/[email protected]
if: ${{ !env.ACT }}
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
pause:
- 'pause/*'
ipvs:
- 'ipvs/*'
flannel:
- 'flannel/*'
bash:
- 'bash/*'
ebpf:
- 'ebpf/*'
check-demo:
name: Check demo on Ubuntu Virtual Environment
runs-on: ubuntu-20.04
needs: changes
strategy:
fail-fast: false
matrix:
demo: ${{ fromJSON(needs.changes.outputs.demos) }}
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.22'
check-latest: true
- uses: ./.github/actions/check-demo
with:
demo-type: ${{ matrix.demo }}
check-bash-shellspec:
name: Run BDD shell specs for Bash demo
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install ShellSpec
run: curl -fsSL https://github.com/shellspec/shellspec/releases/latest/download/shellspec-dist.tar.gz | tar -xz -C ..
- name: Run Shellspec
shell: 'script -q -e -c "bash {0}"'
run: ../shellspec/shellspec --profile --xtrace