Skip to content

Commit

Permalink
chore(ci): add a PR workflow that can be used for status checks (#1252)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas authored Apr 13, 2024
1 parent 2057242 commit 2f3c008
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 40 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/autoversion.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
on:
workflow_call:
workflow_run:
workflows: ["CI"]
branches: ["main"]
types:
- completed
name: Auto-version
jobs:
semver-tag:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Conventional Commits Auto-version
runs-on: ubuntu-latest
steps:
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,19 @@ jobs:
name: Integration Tests
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/integration.yml
autoversion:
name: Auto Version
secrets: inherit
if: github.ref == 'refs/heads/main'
needs:
- kotlin-runtime
- test
- lint
- console
- integration
- sql
uses: ./.github/workflows/autoversion.yml
build-all:
name: Rebuild All
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Build Cache
uses: ./.github/actions/build-cache
- name: Docker Compose
run: docker compose up -d --wait
- name: Init DB
run: just init-db
- name: Rebuild All
run: just build-all
23 changes: 23 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Hopefully use this for the "required status checks"
name: CI Status Check
on:
workflow_run:
workflows: ["CI"]
branches-ignore: ["main"]
types:
- completed
jobs:
on-success:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- run: |
echo "CI Passed"
exit 0
on-failure:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- run: |
echo "CI Failed"
exit 1
27 changes: 0 additions & 27 deletions .github/workflows/rebuild.yml

This file was deleted.

0 comments on commit 2f3c008

Please sign in to comment.