ci: select correct commits and fix regex #394
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: Installation tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
installation-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: | |
- archlinux | |
- ubuntu | |
- fedora | |
if: "${{ !startsWith(github.event.head_commit.message, 'docs: ') && !startsWith(github.event.head_commit.message, 'chore: ') && !startsWith(github.event.head_commit.message, 'style: ') }}" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install on ${{ matrix.os }} | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: tests/${{ matrix.os }}/Dockerfile | |
push: false | |
build-args: SOURCE=${{ github.repository }}@${{ github.sha }} | |
results: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: Installation test results | |
needs: [installation-tests] | |
steps: | |
- run: | | |
result="${{ needs.installation-tests.result }}" | |
if [[ $result == "success" || $result == "skipped" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi |