Bump ubuntu from 20.04 to 22.04 in /12 #56
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- '**Dockerfile' | |
pull_request: | |
branches: [ master ] | |
paths: | |
- '**Dockerfile' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v18.4 | |
- name: Build & Test (Publish) | |
run: | | |
pip install pre-commit && pre-commit install | |
docker login -u '${{ secrets.DOCKER_USERNAME }}' -p '${{ secrets.DOCKER_PASSWORD }}' | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
if [[ "$file" == *"Dockerfile" ]]; then | |
set -e | |
echo "start to build ..." | |
make prune | |
make build FILE=$file | |
docker images | |
echo "start to test ..." | |
tag=`dirname $file` | |
if [ $tag == "all" ]; then | |
clang_versions="16 15 14 13 12 11 10 9 8" | |
for clang_version in ${clang_versions}; do | |
docker run clang-tools:$tag clang-format-$clang_version --version | grep -E "clang-format version $clang_version" | |
docker run clang-tools:$tag clang-tidy-$clang_version --version | grep "LLVM version $clang_version" | |
done | |
elif [[ "$tag" == *"alpine"* ]]; then | |
docker run clang-tools:$tag clang-format --version | grep -E "clang-format version" | |
docker run clang-tools:$tag clang-tidy --version | grep "LLVM version" | |
else | |
docker run clang-tools:$tag clang-format --version | grep -E "clang-format version $tag" | |
docker run clang-tools:$tag clang-tidy --version | grep "LLVM version $tag" | |
fi | |
if [[ $GITHUB_EVENT_NAME == 'push' ]]; then | |
echo "start to publish ..." | |
make publish FILE=$file | |
fi | |
fi | |
done |