Skip to content

Commit

Permalink
try reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaraj-bh committed Aug 6, 2024
1 parent 05130df commit faac55c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ jobs:
- name: Push to cachix
if: github.ref == 'refs/heads/main'
run: nix --option system "${{ matrix.system }}" run .#cachix-push
- name: Run static binary workflow
if: success()
uses: ./.github/workflows/static-binary-check.yaml
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 4 additions & 14 deletions .github/workflows/static-binary-check.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
name: "Static binary"
on:
workflow_run:
workflows: [CI]
types: [completed]
workflow_call:
secrets:
GITHUB_TOKEN:
required: true

jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo 'The triggering workflow passed'
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'
check:
needs: on-success
runs-on: ${{ matrix.system }}
strategy:
matrix:
Expand Down

0 comments on commit faac55c

Please sign in to comment.