Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/github-actions-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: GitHub Actions Workflows

on: pull_request

env:
# Forcing Earthly to use colours, to make reading output easier.
FORCE_COLOR: 1

jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Download Earthly v0.8.6.
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.6/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Checkout code.
uses: actions/checkout@v3
- name: Check GitHub Actions workflows linting.
run: earthly +check-github-actions-workflows-linting
13 changes: 13 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
VERSION 0.7


COPY_CI_DATA:
COMMAND
COPY --dir "ci/" ".github/" "./"


check-github-actions-workflows-linting:
FROM golang:1.20.13
RUN go install github.com/rhysd/actionlint/cmd/[email protected]
DO +COPY_CI_DATA
RUN ./ci/check-github-actions-workflows-linting.sh
6 changes: 6 additions & 0 deletions ci/check-github-actions-workflows-linting.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

set -o errexit
set -o xtrace

actionlint --verbose .github/workflows/*