Add clock 2 picture #52
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
# Copyright © 2022 The OSRD Contributors | |
# | |
# SPDX-License-Identifier: LGPL-3.0-only | |
name: build | |
on: | |
pull_request: | |
workflow_dispatch: | |
merge_group: | |
types: [checks_requested] | |
push: | |
branches: | |
- dev | |
- staging | |
- prod | |
jobs: | |
check_commits: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all branches and tags | |
- name: Check commit names | |
run: | | |
# We don't have a base ref to check against if we aren't in a | |
# pull_request workflow. | |
BASE=${{ github.base_ref }} | |
if [[ -z "$BASE" ]]; then | |
exit 0 | |
fi | |
commit_titles() { | |
git log --format=%s origin/"$BASE"..HEAD --skip=1 | |
} | |
commit_titles | TERM=xterm-color .github/scripts/check-commit-titles.sh | |
check_reuse_compliance: | |
runs-on: ubuntu-latest | |
name: Check REUSE Compliance | |
steps: | |
- uses: actions/checkout@v4 | |
- name: REUSE Compliance Check | |
uses: fsfe/reuse-action@v4 | |
final_newline_lint: | |
runs-on: ubuntu-latest | |
name: Check final newline | |
steps: | |
- name: Install ripgrep | |
run: sudo apt-get install -y ripgrep | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check final newline is present | |
run: | | |
# search missing final newline | |
if rg -Ul '[^\n]\z' -g '!*.svg' .; then | |
echo "Found missing final newline on listed file(s)" | |
exit 1 | |
fi | |
# search multiple final newlines | |
if rg -Ul '\n\n\z' .; then | |
echo "Found multiple final newlines on listed file(s)" | |
exit 1 | |
fi |