abort workflow early if no diff
Some checks failed
Update Determinate Nix binary / download-binary (push) Failing after 35s
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:
parent
fe9e846e3c
commit
d4d4a2a8fd
10
.github/workflows/flake-update.yml
vendored
10
.github/workflows/flake-update.yml
vendored
@ -38,29 +38,30 @@ jobs:
|
|||||||
wget --content-disposition -nv "$DETERMINATE_URL"
|
wget --content-disposition -nv "$DETERMINATE_URL"
|
||||||
|
|
||||||
git diff --quiet
|
git diff --quiet
|
||||||
echo "new_binary=$?" >> "$GITHUB_OUTPUT"
|
echo "DETERMINATE_BINARY_DIFF=$?" | tee -a "$GITHUB_OUTPUTS"
|
||||||
env:
|
env:
|
||||||
DETERMINATE_URL: ${{ env.DETERMINATE_URL }}
|
DETERMINATE_URL: ${{ env.DETERMINATE_URL }}
|
||||||
update-tags:
|
|
||||||
if: steps.download-binary.outputs.new_binary != 0
|
|
||||||
steps:
|
|
||||||
- name: Git config
|
- name: Git config
|
||||||
|
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
|
||||||
run: |
|
run: |
|
||||||
git config user.name github-actions
|
git config user.name github-actions
|
||||||
git config user.email github-actions@github.com
|
git config user.email github-actions@github.com
|
||||||
- name: Commit binary
|
- name: Commit binary
|
||||||
|
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add .
|
||||||
git commit -m "automated download workflow"
|
git commit -m "automated download workflow"
|
||||||
commit_id=$(git rev-parse HEAD)
|
commit_id=$(git rev-parse HEAD)
|
||||||
echo "COMMIT_ID=$(echo $commit_id)" >> $GITHUB_ENV
|
echo "COMMIT_ID=$(echo $commit_id)" >> $GITHUB_ENV
|
||||||
- name: Tag new target
|
- name: Tag new target
|
||||||
|
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
|
||||||
run: |
|
run: |
|
||||||
git tag -f "$DETERMINATE_VERSION" "$COMMIT_ID"
|
git tag -f "$DETERMINATE_VERSION" "$COMMIT_ID"
|
||||||
env:
|
env:
|
||||||
DETERMINATE_VERSION: ${{ env.DETERMINATE_VERSION }}
|
DETERMINATE_VERSION: ${{ env.DETERMINATE_VERSION }}
|
||||||
COMMIT_ID: ${{ env.COMMIT_ID }}
|
COMMIT_ID: ${{ env.COMMIT_ID }}
|
||||||
- name: Push new tag
|
- name: Push new tag
|
||||||
|
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
|
||||||
run: |
|
run: |
|
||||||
git push origin "$DETERMINATE_VERSION" --force
|
git push origin "$DETERMINATE_VERSION" --force
|
||||||
git checkout main
|
git checkout main
|
||||||
@ -69,6 +70,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DETERMINATE_VERSION: ${{ env.DETERMINATE_VERSION }}
|
DETERMINATE_VERSION: ${{ env.DETERMINATE_VERSION }}
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
|
if: steps.download-binary.outputs.DETERMINATE_BINARY_DIFF != 0
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
||||||
|
Loading…
x
Reference in New Issue
Block a user