-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
79 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 'CI' | ||
|
||
on: # Build any PRs and main branch changes | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
push: | ||
branches: [ master ] | ||
schedule: | ||
- cron: '0 0 1 * *' # Every month | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
static-tests: | ||
name: Static tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate action file syntax | ||
run: yamllint -d relaxed action.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Trigger test repo workflow' | ||
on: | ||
workflow_run: | ||
workflows: ["CI"] | ||
types: [completed] | ||
|
||
jobs: | ||
tests: | ||
name: Run functional tests | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger test repository worfklow | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.FUNCTIONAL_TESTS_TRIGGER }} | ||
run: | | ||
gh api \ | ||
--method POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
/repos/yoanm/gha-versioning-test-repo/actions/workflows/functional-tests.yml/dispatches \ | ||
-f "ref=master" \ | ||
-f "inputs[sha]=${{ github.event.workflow_run.head_sha }}" |
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