-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: adding GitHub Actions Workflows linting
- Loading branch information
1 parent
15bbcaf
commit db9028f
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.12. | ||
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.12/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,30 @@ | ||
VERSION 0.7 | ||
|
||
|
||
COPY_CI_DATA: | ||
COMMAND | ||
COPY --dir "ci/" ".github/" "./" | ||
|
||
|
||
golang-base: | ||
FROM golang:1.22.1 | ||
ENV GOPROXY=direct | ||
ENV CGO_ENABLED=0 | ||
ENV GOOS=linux | ||
ENV GOARCH=amd64 | ||
|
||
|
||
check-github-actions-workflows-linting: | ||
FROM +golang-base | ||
RUN go install github.com/rhysd/actionlint/cmd/[email protected] | ||
DO +COPY_CI_DATA | ||
RUN ./ci/check-github-actions-workflows-linting.sh | ||
|
||
|
||
check-linting: | ||
BUILD +check-github-actions-workflows-linting | ||
|
||
|
||
e2e-formatting-base: | ||
FROM python:3.12.0-slim | ||
COPY "./ci" "./ci" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |