From a0af4355d0fb1509f0b2ff73e7f14dde53ddb362 Mon Sep 17 00:00:00 2001 From: ghostloda <78798447@qq.com> Date: Thu, 27 Feb 2025 21:31:14 +0800 Subject: [PATCH] fix workflows --- .github/workflows/check-coverage.yml | 6 ++---- .github/workflows/check-format-code.yml | 3 ++- .github/workflows/check-license.yml | 3 ++- .github/workflows/import-patch-image.yml | 3 ++- {scripts => lifecycle/scripts}/template/LICENSE | 0 {scripts => lifecycle/scripts}/template/boilerplate.go.txt | 0 6 files changed, 8 insertions(+), 7 deletions(-) rename {scripts => lifecycle/scripts}/template/LICENSE (100%) rename {scripts => lifecycle/scripts}/template/boilerplate.go.txt (100%) diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index a65ccb4ff22..ceccb6407db 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -22,7 +22,7 @@ on: env: # Common versions GO_VERSION: "1.20" - PROJECT_PATH: "lifecycle" + PROJECT_PATH: "./lifecycle" jobs: coverage: @@ -39,10 +39,8 @@ jobs: - name: Install Dependencies run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev - - name: CD to Project Directory - run: cd ${{ env.PROJECT_PATH }} - name: Run Coverage - run: make coverage + run: cd ${{ env.PROJECT_PATH }} && make coverage - name: Upload Coverage to Codecov uses: codecov/codecov-action@v3 diff --git a/.github/workflows/check-format-code.yml b/.github/workflows/check-format-code.yml index 9de0b54c75c..8760c1ebde2 100755 --- a/.github/workflows/check-format-code.yml +++ b/.github/workflows/check-format-code.yml @@ -22,6 +22,7 @@ on: env: # Common versions GO_VERSION: "1.23" + PROJECT_PATH: "./lifecycle" jobs: format-code: @@ -39,7 +40,7 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Format Code - run: make format + run: cd ${{ env.PROJECT_PATH }} && make format - name: Commit Changes uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml index fa3a5ffc3f4..9059f8575ed 100755 --- a/.github/workflows/check-license.yml +++ b/.github/workflows/check-license.yml @@ -22,6 +22,7 @@ on: env: # Common versions GO_VERSION: "1.20" + PROJECT_PATH: "./lifecycle" jobs: check-license: @@ -38,4 +39,4 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Check License - run: make verify-license + run: cd ${{ env.PROJECT_PATH }} && make verify-license diff --git a/.github/workflows/import-patch-image.yml b/.github/workflows/import-patch-image.yml index 20de191621a..5ac21d70476 100755 --- a/.github/workflows/import-patch-image.yml +++ b/.github/workflows/import-patch-image.yml @@ -3,6 +3,7 @@ name: Import Patch Images Package env: # Common versions GO_VERSION: "1.20" + PROJECT_PATH: "./lifecycle" on: workflow_call: @@ -91,7 +92,7 @@ jobs: - name: Build Binaries run: | - make build BINS=${{ matrix.binary }} PLATFORM=linux_${{ matrix.arch }} + cd ${{ env.PROJECT_PATH }} && make build BINS=${{ matrix.binary }} PLATFORM=linux_${{ matrix.arch }} - name: Save Binaries uses: actions/upload-artifact@v4 with: diff --git a/scripts/template/LICENSE b/lifecycle/scripts/template/LICENSE similarity index 100% rename from scripts/template/LICENSE rename to lifecycle/scripts/template/LICENSE diff --git a/scripts/template/boilerplate.go.txt b/lifecycle/scripts/template/boilerplate.go.txt similarity index 100% rename from scripts/template/boilerplate.go.txt rename to lifecycle/scripts/template/boilerplate.go.txt