From 7e6a31f38bd6e500e9dcae50be2c8871d3fb11ae Mon Sep 17 00:00:00 2001 From: Mauro Morales Date: Wed, 29 Mar 2023 14:16:41 +0200 Subject: [PATCH] Add lint workflow Signed-off-by: Mauro Morales --- .github/workflows/lint.yaml | 28 ++++++++++++++++++++++++++++ Earthfile | 4 ++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..6eb3dc5 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,28 @@ +name: Lint +on: + push: + branches: + - main + pull_request: + paths: + - '**' +env: + FORCE_COLOR: 1 +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install Go + uses: actions/setup-go@v4 + - name: Install earthly + uses: Luet-lab/luet-install-action@v1 + with: + repository: quay.io/kairos/packages + packages: utils/earthly + - name: Run Lint checks + run: | + earthly +lint diff --git a/Earthfile b/Earthfile index 03f0a63..41bbe6f 100644 --- a/Earthfile +++ b/Earthfile @@ -67,6 +67,10 @@ iso: SAVE ARTIFACT /build/$ISO_NAME.iso iso AS LOCAL build/$ISO_NAME.iso SAVE ARTIFACT /build/$ISO_NAME.iso.sha256 sha256 AS LOCAL build/$ISO_NAME.iso.sha256 +lint: + BUILD +golint + BUILD +yamllint + golint: ARG GO_VERSION FROM golang:$GO_VERSION