From 66ce025c3c2320a382e3e835b84fd27e7ced76a5 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 13 Jan 2021 21:30:16 +0100 Subject: [PATCH] Replace GitLab CI with GitHub Actions --- .github/workflows/lint.yaml | 33 +++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 37 ------------------------------------- 2 files changed, 33 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/lint.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 000000000..1bc074f0e --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,33 @@ +--- +name: Lint + +# yamllint disable-line rule:truthy +on: + push: + pull_request: + types: + - opened + - reopened + - synchronize + workflow_dispatch: + +jobs: + json: + name: JSON Lint + runs-on: ubuntu-latest + steps: + - name: ⤵️ Check out code from GitHub + uses: actions/checkout@v2.3.4 + - name: 🚀 Run JQ + run: | + shopt -s globstar + cat **/*.json | jq '.' + + yamllint: + name: YAMLLint + runs-on: ubuntu-latest + steps: + - name: ⤵️ Check out code from GitHub + uses: actions/checkout@v2.3.4 + - name: 🚀 Run YAMLLint + uses: frenck/action-yamllint@v1.0.2 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 9270c40fa..000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -image: docker:stable - -stages: - - linting - -.linting: &linting - stage: linting - tags: - - linting - -yamllint: - <<: *linting - image: sdesbure/yamllint - before_script: - - yamllint --version - script: - - yamllint . - -jsonlint: - <<: *linting - image: sahsu/docker-jsonlint - before_script: - - jsonlint --version || true - script: - - | - for file in $(find . -type f -name "*.json"); do - if ! jsonlint -q $file; then - export FAILED=1 - else - echo "$file OK" - fi - done - if [ "${FAILED}" = "1" ]; then - exit 1 - fi -