From 46c36d9ae6855e67a386690efe7a2f78f4dce15d Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Thu, 17 Apr 2025 18:21:28 +0200 Subject: [PATCH] Use upload / download / merge / pust to repo This fixes race condition --- .github/workflows/build.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 407cc85..8232182 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout the code uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 1 - name: Set up build environment and artifacts directory run: | sudo apt-get update @@ -53,6 +53,28 @@ jobs: reprepro -b debian/artifacts includedsc stable debian/artifacts/*.dsc reprepro -b debian/artifacts includedeb stable debian/artifacts/*.deb reprepro -b debian/artifacts export + - name: "Upload artifacts" + uses: actions/upload-artifact@v4 + with: + name: artifacts-${{ matrix.architecture }} + path: debian/artifacts/ + if-no-files-found: ignore + + merge: + name: "Merge artifacts" + needs: build-debs + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Download All Artifacts + uses: actions/download-artifact@v4 + with: + path: debian/artifacts/ + pattern: artifacts-* + merge-multiple: true - name: Commit changes if any run: | git checkout data