From db5a7f08209df36e03c74ab07a864bc63ce11482 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 16 Jan 2022 19:41:28 +0100 Subject: [PATCH] Add correct working directory to jobs default Signed-off-by: trivernis --- .github/workflows/build-api.yml | 16 ++++++++++------ .github/workflows/build-daemon.yml | 11 ++++++++--- .github/workflows/build-ui.yml | 26 ++++++++++++++++---------- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-api.yml b/.github/workflows/build-api.yml index 6a9eee2..65796aa 100644 --- a/.github/workflows/build-api.yml +++ b/.github/workflows/build-api.yml @@ -10,7 +10,12 @@ env: CARGO_TERM_COLOR: always jobs: - + + defaults: + run: + shell: bash + working-directory: mediarepo-api + build: strategy: fail-fast: false @@ -19,11 +24,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - - name: switch working directory - run: cd mediarepo-api + if: ${{ !env.ACT }} - name: Cache build data + if: ${{ !env.ACT }} uses: actions/cache@v2 with: path: | @@ -37,8 +41,8 @@ jobs: uses: knicknic/os-specific-run@v1.0.3 with: linux: | - sudo apt update - sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y - name: Build run: cargo build diff --git a/.github/workflows/build-daemon.yml b/.github/workflows/build-daemon.yml index 7960db3..1ec7d94 100644 --- a/.github/workflows/build-daemon.yml +++ b/.github/workflows/build-daemon.yml @@ -10,6 +10,11 @@ env: CARGO_TERM_COLOR: always jobs: + + defaults: + run: + shell: bash + working-directory: mediarepo-daemon build: strategy: @@ -19,11 +24,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - - name: switch working directory - run: cd mediarepo-daemon + if: ${{ !env.ACT }} - name: Cache build data + if: ${{ !env.ACT }} uses: actions/cache@v2 with: path: | @@ -37,6 +41,7 @@ jobs: run: cargo build --release --no-default-features - name: Upload artifacts + if: ${{ !env.ACT }} uses: actions/upload-artifact@v2 with: name: mediarepo-daemon-${{ runner.os }} diff --git a/.github/workflows/build-ui.yml b/.github/workflows/build-ui.yml index a5841bb..a39974d 100644 --- a/.github/workflows/build-ui.yml +++ b/.github/workflows/build-ui.yml @@ -8,6 +8,12 @@ on: - github-actions jobs: + + defaults: + run: + shell: bash + working-directory: mediarepo-ui + build-debug: runs-on: ${{ matrix.os }} @@ -19,11 +25,10 @@ jobs: steps: - uses: actions/checkout@v2 - - - name: switch working directory - run: cd mediarepo-ui + if: ${{ !env.ACT }} - name: Cache Dependencies + if: ${{ !env.ACT }} id: cache-dependencies uses: actions/cache@v2 with: @@ -58,13 +63,14 @@ jobs: uses: knicknic/os-specific-run@v1.0.3 with: linux: | - sudo apt update - sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y - name: Build project run: cargo tauri build --debug - name: Upload artifacts + if: ${{ !env.ACT }} uses: actions/upload-artifact@v2 with: name: mediarepo-ui-${{ runner.os }}-debug @@ -83,11 +89,10 @@ jobs: steps: - uses: actions/checkout@v2 - - - name: switch working directory - run: cd mediarepo-ui + if: ${{ !env.ACT }} - name: Cache Dependencies + if: ${{ !env.ACT }} id: cache-dependencies uses: actions/cache@v2 with: @@ -122,13 +127,14 @@ jobs: uses: knicknic/os-specific-run@v1.0.3 with: linux: | - sudo apt update - sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y - name: Build project run: cargo tauri build - name: Upload artifacts + if: ${{ !env.ACT }} uses: actions/upload-artifact@v2 with: name: mediarepo-ui-${{ runner.os }}-release