Skip to content

Commit

Permalink
Update GitHub Actions workflow to include branch input
Browse files Browse the repository at this point in the history
  • Loading branch information
cophilot committed Mar 9, 2024
1 parent b6f0dfc commit 45f0d89
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/check_rust_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:
branches:
- dev
workflow_call:

inputs:
branch:
required: true
type: string

env:
CARGO_TERM_COLOR: always
Expand All @@ -16,6 +19,11 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch || 'dev' }}

- name: Print branch
run: git branch

- name: Check formatting
run: ./scripts/format:check
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ env:

jobs:

tests:
uses: cophilot/templify/.github/workflows/check_rust_quality.yml
quality-check:
uses: ./.github/workflows/check_rust_quality.yml
with:
branch: master

upload-release:
runs-on: ubuntu-latest
needs: [build-linux, build-windows, macos-linux]

steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -43,7 +45,7 @@ jobs:

build-linux:
runs-on: ubuntu-latest

needs: [quality-check]
steps:
- uses: actions/checkout@v2

Expand All @@ -61,7 +63,7 @@ jobs:

macos-linux:
runs-on: macos-latest

needs: [quality-check]
steps:
- uses: actions/checkout@v2

Expand All @@ -79,7 +81,7 @@ jobs:

build-windows:
runs-on: windows-latest

needs: [quality-check]
steps:
- uses: actions/checkout@v2

Expand Down

0 comments on commit 45f0d89

Please sign in to comment.