From 7b25cf3cc134e2d5b069cd8cbe3d95015e13e825 Mon Sep 17 00:00:00 2001 From: Ross Ceballo Date: Tue, 13 Aug 2024 01:39:35 +0000 Subject: [PATCH] Add ymllint, shellcheck and other actions --- .github/workflows/build.yaml | 2 +- .github/workflows/markdownlint.yaml | 17 +++++++++++++++++ .github/workflows/rebase_checker.yaml | 8 ++++++++ .github/workflows/shellcheck.yaml | 18 ++++++++++++++++++ .github/workflows/yamllint.yaml | 25 +++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/markdownlint.yaml create mode 100644 .github/workflows/rebase_checker.yaml create mode 100644 .github/workflows/shellcheck.yaml create mode 100644 .github/workflows/yamllint.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 80e7f19..f65f60d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,7 +16,7 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Docker meta id: meta uses: docker/metadata-action@v5 diff --git a/.github/workflows/markdownlint.yaml b/.github/workflows/markdownlint.yaml new file mode 100644 index 0000000..a701171 --- /dev/null +++ b/.github/workflows/markdownlint.yaml @@ -0,0 +1,17 @@ +--- +name: Lint Markdown Files + +on: + push: + branches: + - main + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Run linter + uses: actionshub/markdownlint@main diff --git a/.github/workflows/rebase_checker.yaml b/.github/workflows/rebase_checker.yaml new file mode 100644 index 0000000..62aeca7 --- /dev/null +++ b/.github/workflows/rebase_checker.yaml @@ -0,0 +1,8 @@ +--- +name: Check that 'main' is not merged into the development branch + +on: pull_request + +jobs: + call-workflow: + uses: lsst/rubin_workflows/.github/workflows/rebase_checker.yaml@main diff --git a/.github/workflows/shellcheck.yaml b/.github/workflows/shellcheck.yaml new file mode 100644 index 0000000..eb011bd --- /dev/null +++ b/.github/workflows/shellcheck.yaml @@ -0,0 +1,18 @@ +--- +name: shellcheck + +on: + push: + branches: + - main + pull_request: + +jobs: + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run shellcheck + uses: ludeeus/action-shellcheck@master + # See https://github.com/ludeeus/action-shellcheck for customizations diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 0000000..cb17767 --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -0,0 +1,25 @@ +--- +name: Lint YAML Files + +on: + push: + branches: + - main + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: 3.12 + + - name: Install + run: pip install yamllint + + - name: Run linter + run: yamllint .