[ci] Attempt to fix release workflow #1396
Workflow file for this run
This file contains hidden or 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
name: Code Style | |
on: pull_request | |
# Cancel CI workflows which are still running from previous pushes | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
clang-format: | |
name: Clang Format | |
runs-on: ubuntu-latest | |
container: ubuntu:rolling | |
env: | |
DEBIAN_FRONTEND: "noninteractive" | |
steps: | |
- name: Update environment | |
shell: bash | |
run: | | |
# Update package lists | |
apt update -qq | |
# Install tools | |
apt install -y \ | |
clang-format \ | |
git | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fetch ${{ github.base_ref }} | |
shell: bash | |
run: | | |
git config --global --add safe.directory $(pwd) | |
git fetch --progress --depth=1 origin ${{ github.base_ref }} | |
git log --pretty=oneline | |
- name: Style check | |
shell: bash | |
run: | | |
git-clang-format origin/${{ github.base_ref }} | |
git diff | tee format-diff | |
if [ -s format-diff ]; then exit 1; fi |