Skip to content

Commit

Permalink
add linter from github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Jul 28, 2024
1 parent 4449567 commit 3b7e449
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

services:
docker:
image: docker:20.10.20
options: --privileged

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull and build Docker image
run: |
docker pull ghcr.io/${{ github.repository }}:builder-${{ github.ref_name }} || true
docker build --cache-from ghcr.io/${{ github.repository }}:builder-${{ github.ref_name }} -t ghcr.io/${{ github.repository }}:builder-${{ github.ref_name }} -f contrib/containers/ci/Dockerfile .
docker push ghcr.io/${{ github.repository }}:builder-${{ github.ref_name }}
- name: Run lint-all.sh
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace ghcr.io/${{ github.repository }}:builder-${{ github.ref_name }} ./test/lint/lint-all.sh

0 comments on commit 3b7e449

Please sign in to comment.