Skip to content

Commit

Permalink
update-version.yml: actually prevent PR from being made on build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ezKEa committed Nov 14, 2023
1 parent 5426eba commit 6c4fb29
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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() }}
Expand All @@ -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:
Expand Down

0 comments on commit 6c4fb29

Please sign in to comment.