Skip to content

Adiciona o docker do firmware #87

Adiciona o docker do firmware

Adiciona o docker do firmware #87

Workflow file for this run

name: Build lint and check formatting
on:
pull_request:
branches:
- develop
- main
push:
branches:
- develop
- main
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
steps:
- name: πŸ”€ Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: πŸ—ƒοΈ Check cache
id: cache
uses: actions/cache/restore@v4
with:
path: docker/Dockerfile
key: ${{ hashFiles('.github/*', 'cmake/*', '**/*.cpp', '**/*.hpp', '**/*.ioc', '.clang*', 'CMakeLists.txt', 'docker/*') }}
lookup-only: true
- name: πŸ”§ Set up Docker Buildx
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/setup-buildx-action@v3
- name: πŸ‹ Build Docker image
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
target: build
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
no-cache-filters: build
tags: project:build
- name: 🎨 Check code formatting
if: steps.cache.outputs.cache-hit != 'true'
run: docker run --rm project:build /bin/bash /project/docker/scripts/check_format.sh
- name: πŸ”¨ Build project
if: steps.cache.outputs.cache-hit != 'true'
run: docker run --rm project:build /bin/bash /project/docker/scripts/build.sh
- name: 🚨 Lint project
if: steps.cache.outputs.cache-hit != 'true'
run: docker run --rm project:build /bin/bash /project/docker/scripts/build.sh -DLINTER_MODE=ON
- name: πŸ—ƒοΈ Save cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: docker/Dockerfile
key: ${{ steps.cache.outputs.cache-primary-key }}