Skip to content

Commit

Permalink
πŸ’š [ci] testing build as own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jxn-30 committed Jan 4, 2023
1 parent b264586 commit 205fd10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,4 @@ jobs:
uses: ./.github/workflows/deploy.yml
with:
branch: ${{ needs.build.outputs.branch }}
secrets: inherit

test:
name: '[πŸ‘·πŸš€] Test'
uses: ./.github/workflows/test_build.yml
with:
ref: ${{ github.ref }}
secrets: inherit
14 changes: 3 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: '[πŸ‘·πŸ”€] PR Build'
run-name: '[πŸ‘·πŸ”€] Build on PR #${{ github.event.number }}, `${{ github.ref }}`'

on: [pull_request]
on:
pull_request:

jobs:
build:
Expand All @@ -16,13 +17,4 @@ jobs:
uses: ./.github/workflows/test_build.yml
with:
ref: ${{ github.ref }}
secrets: inherit

success:
name: '[πŸ‘·πŸ”€] Success'
needs: [build, test]
runs-on: ubuntu-latest
if: ${{ success() }}
steps:
- run: |
echo "πŸ₯³ Build and test successful!"
secrets: inherit
13 changes: 3 additions & 10 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: '[πŸ§ͺ] Test build'
run-name: '[πŸ§ͺ] Test build on `${{ inputs.ref }}`'
run-name: '[πŸ§ͺ] Test build on `${{ github.ref }}`'

on:
workflow_call:
inputs:
ref:
description: 'The ref to build on'
required: false
type: string
default: github.ref
push:
pull_request:

jobs:
build:
Expand All @@ -21,8 +16,6 @@ jobs:
- name: '[πŸ“₯] checkout'
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
ref: ${{ inputs.ref }}
fetch-depth: 0

- name: '[πŸ‘·] run build script'
Expand Down

0 comments on commit 205fd10

Please sign in to comment.