Skip to content

Commit

Permalink
feat(tooling): Dispatch workflow (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurdotb authored Apr 8, 2022
1 parent 0b261d3 commit 666b41d
Show file tree
Hide file tree
Showing 7 changed files with 263 additions and 172 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Workflow Dispatch"

on: push

jobs:
call-lint:
uses: ./.github/workflows/lint.yml

call-test:
needs: call-lint
uses: ./.github/workflows/test.yml
57 changes: 29 additions & 28 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,56 @@
name: Lint

on: [push]
on: workflow_call
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

sh-euox-pipefail-check:
name: "Lint: Check for 'set -euox pipefail' in shell scripts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check that all shell scripts use 'set -euox pipefail'
run: bash .github/scripts/ensure_set_euox_pipefail.sh

# We can't use VALIDATE_GO from super linter because of this issue:
# https://github.com/github/super-linter/issues/143
go-lint:
name: Lint Go
runs-on: ubuntu-20.04
name: "Lint: Golang"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.43.0
version: latest
args: --timeout 5m0s

md-link-check:
name: Check Markdown links
name: "Lint: Check for broken Markdown links"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: actions/checkout@v3
- name: Check if Markdown links are valid
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
with:
config-file: '.github/linters/mlc_config.json'
folder-path: "."

sh-euox-pipefail-check:
name: Check for 'set -euox pipefail' in shell scripts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check that all shell scripts use 'set -euox pipefail'
run: bash .github/scripts/ensure_set_euox_pipefail.sh
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'

super-lint:
name: Run super linter
name: "Lint: Super Linter"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version

- name: Super-Linter
- name: Run Super Linter
uses: github/super-linter/slim@v4
env:
IGNORE_GITIGNORED_FILES: true
Expand All @@ -60,7 +61,7 @@ jobs:
MULTI_STATUS: true

VALIDATE_BASH: true
# VALIDATE_GITHUB_ACTIONS: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_JSON: true
VALIDATE_MARKDOWN: true
VALIDATE_OPENAPI: true
Expand Down
Loading

0 comments on commit 666b41d

Please sign in to comment.