From 6c4fb2986cda574f6a436e0fcd06e12a1070a89b Mon Sep 17 00:00:00 2001 From: ezKEa Date: Mon, 13 Nov 2023 20:18:27 -0500 Subject: [PATCH] update-version.yml: actually prevent PR from being made on build failure --- .github/workflows/update-version.yml | 32 ++++++++++++++++++---------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 60164f2..46d5a2a 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -117,15 +117,15 @@ jobs: - the-honkers-railway-launcher - honkers-launcher steps: - - name: Download skip artifact + - name: Download diff artifact uses: actions/download-artifact@v3 with: - name: "${{ matrix.package }}-skipped.artifact" - path: "${{ matrix.package }}-skipped.artifact" + name: "${{ matrix.package }}-update.diff" + path: "${{ matrix.package }}-update.diff" - - name: Check if build skipped + - name: Check for update artifact run: | - echo "skipped=$(cat ${{ matrix.package }}-skipped.artifact/${{ matrix.package }}-skipped.artifact)" >> $GITHUB_ENV + [[ -f "${{ matrix.package}}-update.diff/${{ matrix.package }}-update.diff" ]] || exit 1 - name: Install Doppler CLI uses: dopplerhq/cli-action@v2 @@ -154,12 +154,6 @@ jobs: authToken: '${{ env.CACHIX_AUTH_TOKEN }}' pushFilter: '(-source$|-src$|\.tar\.gz$|\.patch$)' - - name: Download diff artifact - uses: actions/download-artifact@v3 - with: - name: "${{ matrix.package }}-update.diff" - path: "${{ matrix.package }}-update.diff" - - name: Apply diff run: | git apply "${{ matrix.package }}-update.diff/${{ matrix.package }}-update.diff" @@ -170,6 +164,12 @@ jobs: env: NIXPKGS_ALLOW_UNFREE: 1 + - name: Upload success artifact + uses: actions/upload-artifact@v3 + with: + name: "${{ matrix.package }}-success.artifact" + path: "${{ matrix.package }}-success.artifact" + pr: name: Make PR if: ${{ ! cancelled() }} @@ -194,6 +194,16 @@ jobs: env: DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }} + - name: Download build success artifact + uses: actions/download-artifact@v3 + with: + name: "${{ matrix.package }}-success.artifact" + path: "${{ matrix.package }}-success.artifact" + + - name: Check for build success + run: | + [[ -f "${{ matrix.package}}-update.diff/${{ matrix.package }}-update.diff" ]] || exit 1 + - name: Checkout repository uses: actions/checkout@v4 with: