Skip to content

Commit e37df50

Browse files
refactor: centralize working-directory using defaults.run
1 parent 842305a commit e37df50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/rust-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ on:
4343
CARGO_REGISTRY_TOKEN:
4444
required: false
4545

46+
defaults:
47+
run:
48+
working-directory: ${{ inputs.working-directory }}
49+
4650
env:
4751
CARGO_TERM_COLOR: always
4852
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
4953

5054
jobs:
5155
build:
5256
runs-on: ubuntu-latest
53-
working-directory: ${{ inputs.working-directory }}
5457
steps:
5558
- name: Checkout repository
5659
uses: actions/checkout@v4
@@ -105,7 +108,6 @@ jobs:
105108
needs: build
106109
if: ${{ inputs.publish-crates-io && needs.build.result == 'success' }}
107110
runs-on: ubuntu-latest
108-
working-directory: ${{ inputs.working-directory }}
109111
steps:
110112
- name: Checkout repository
111113
uses: actions/checkout@v4

0 commit comments

Comments
 (0)