Skip to content

fixes?

fixes? #2

Workflow file for this run

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: |
LOWERCASE_REPO=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
docker pull ghcr.io/$LOWERCASE_REPO:builder-${{ github.ref_name }} || true
docker build --cache-from ghcr.io/$LOWERCASE_REPO:builder-${{ github.ref_name }} -t ghcr.io/$LOWERCASE_REPO:builder-${{ github.ref_name }} -f contrib/containers/ci/Dockerfile .
docker push ghcr.io/$LOWERCASE_REPO:builder-${{ github.ref_name }}
- name: Run lint-all.sh
run: |
LOWERCASE_REPO=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace ghcr.io/$LOWERCASE_REPO:builder-${{ github.ref_name }} ./test/lint/lint-all.sh