Release Version 3.1.0 #141
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: Build and Test | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
check: | |
name: Check if changelog and version have been updated | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check changelog | |
run: | | |
git fetch origin main ${{ github.event.pull_request.base.sha }} | |
VER_DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- ./VERSION) | |
if ! [ "${VER_DIFF}" ]; then | |
echo "::warning title=Version check failed::VERSION must be updated!" | |
exit 1 | |
fi | |
CL_DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- ./CHANGELOG.md) | |
if ! [ "${CL_DIFF}" ]; then | |
echo "::warning title=CHEANGELOG check failed::CHANGELOG.md must be updated!" | |
exit 1 | |
fi | |
shell: bash | |
check-skippable-changes: | |
name: Check skippable changes | |
runs-on: ubuntu-latest | |
outputs: | |
skip: ${{ steps.check_if_skippable.outputs.should_skip }} | |
steps: | |
- id: check_if_skippable | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
cancel_others: 'true' | |
do_not_skip: '["workflow_dispatch"]' | |
paths_ignore: '["**.md"]' | |
skip_after_successful_duplicate: 'true' | |
test: | |
needs: check-skippable-changes | |
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }} | |
runs-on: ubuntu-latest | |
name: Run tests | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Test | |
run: | | |
DOCKER_BUILDKIT=1 docker build --target test . | |
shell: bash | |