From 71ef37b7f313c8e6059b87a32630139dacf6f4fd Mon Sep 17 00:00:00 2001 From: Rim Rakhimov Date: Thu, 27 Jun 2024 13:03:26 +0400 Subject: [PATCH] Fix working directory inputs --- .github/actions/setup/action.yml | 6 +++--- .github/workflows/da-indexer.yml | 4 ++-- .github/workflows/r_linting.yml | 8 ++++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 138da06a5..c0f5f5d12 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -2,8 +2,8 @@ name: 'Setup' description: 'Checkout repository, setup rust toolchain and dependencies' inputs: - service-name: - description: 'A directory name where the service target is located' + working-directory: + description: 'A directory where the service code is located' required: true components: description: Comma-separated list of components to be additionally installed @@ -24,4 +24,4 @@ runs: uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - workspaces: '${{ inputs.workspaces }} -> target' + workspaces: '${{ inputs.working-directory }} -> target' diff --git a/.github/workflows/da-indexer.yml b/.github/workflows/da-indexer.yml index 2133da378..f301ddaf8 100644 --- a/.github/workflows/da-indexer.yml +++ b/.github/workflows/da-indexer.yml @@ -48,7 +48,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - service-name: da-indexer + working-directory: da-indexer - name: Unit tests run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture @@ -71,7 +71,7 @@ jobs: name: Linting uses: ./.github/workflows/r_linting.yml with: - service-name: da-indexer + working-directory: da-indexer docker: name: Docker build and docker push diff --git a/.github/workflows/r_linting.yml b/.github/workflows/r_linting.yml index b7526204d..71eea45bd 100644 --- a/.github/workflows/r_linting.yml +++ b/.github/workflows/r_linting.yml @@ -3,10 +3,14 @@ name: Linting (reusable) on: workflow_call: inputs: - service-name: + working-directory: required: true type: string +defaults: + run: + working-directory: ${{ inputs.working-directory }} + jobs: lint: runs-on: ubuntu-latest @@ -17,7 +21,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - service-name: ${{ inputs.service-name }} + working-directory: ${{ inputs.working-directory }} components: rustfmt, clippy - name: cargo fmt