Skip to content

Create a common trigger for testing. #1

Create a common trigger for testing.

Create a common trigger for testing. #1

Workflow file for this run

name: Tests trigger
on:
workflow_dispatch:
pull_request:
branches:
- master
# Do not trigger tests for documentation or markdown docs.
paths-ignore:
- 'docs/**'
- '*.md'
push:
branches:
- master
# Do not trigger tests for documentation or markdown docs.
paths-ignore:
- 'docs/**'
- '*.md'
schedule:
# Trigger tests every day at 02:00 UTC to refresh cache.
- cron: '0 2 * * *'
jobs:
activate-tests:
name: Pass only if the tests should run
runs-on: ubuntu-latest
steps:
- name: Pass or fail
# For merged PR, activate testing only on the master branch, based on:
# https://github.community/t/trigger-workflow-only-on-pull-request-merge/17359
if: ${{ github.ref == 'refs/heads/master' || (
github.event.action != 'closed'
&& github.event.pull_request.merged == false
) }}
run: |
exit 1