abort workflow early if no diff
Some checks failed
Update Determinate Nix binary / download-binary (push) Failing after 35s

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2025-05-26 14:12:24 -04:00
parent fe9e846e3c
commit d4d4a2a8fd
No known key found for this signature in database
GPG Key ID: 47940175096C1330

View File

@ -38,29 +38,30 @@ jobs:
wget --content-disposition -nv "$DETERMINATE_URL"
git diff --quiet
echo "new_binary=$?" >> "$GITHUB_OUTPUT"
echo "DETERMINATE_BINARY_DIFF=$?" | tee -a "$GITHUB_OUTPUTS"
env:
DETERMINATE_URL: ${{ env.DETERMINATE_URL }}
update-tags:
if: steps.download-binary.outputs.new_binary != 0
steps:
- name: Git config
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Commit binary
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
run: |
git add .
git commit -m "automated download workflow"
commit_id=$(git rev-parse HEAD)
echo "COMMIT_ID=$(echo $commit_id)" >> $GITHUB_ENV
- name: Tag new target
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
run: |
git tag -f "$DETERMINATE_VERSION" "$COMMIT_ID"
env:
DETERMINATE_VERSION: ${{ env.DETERMINATE_VERSION }}
COMMIT_ID: ${{ env.COMMIT_ID }}
- name: Push new tag
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
run: |
git push origin "$DETERMINATE_VERSION" --force
git checkout main
@ -69,6 +70,7 @@ jobs:
env:
DETERMINATE_VERSION: ${{ env.DETERMINATE_VERSION }}
- name: Publish release
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
uses: akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18