Skip to content

Commit

Permalink
link precommit and CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cwlacewe committed Feb 20, 2025
1 parent 06cf9f8 commit 62c990f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: CI

# on:
# pull_request:
# types: [opened, synchronize, reopened]
# branches: [develop]
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [develop]
workflow_run:
workflows: [Pre-commit]
types:
- completed

# Declare default permissions as write only.
permissions: read-all
Expand All @@ -19,6 +24,21 @@ concurrency:
cancel-in-progress: true

jobs:
pre-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo 'Pre-commit completed successfully.'
pre-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'Pre-commit failed. Please fix issues.'
pre-exit:
needs: pre-failure
runs-on: ubuntu-latest
steps:
- run: exit 1
Get-Envs:
name: Get Environment vars
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Pre-commit

on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches: [develop]

# Declare default permissions as write only.
permissions: read-all
Expand Down

0 comments on commit 62c990f

Please sign in to comment.