diff --git a/.github/workflows/flake-update.yml b/.github/workflows/flake-update.yml index 0e5275c..3c803c5 100644 --- a/.github/workflows/flake-update.yml +++ b/.github/workflows/flake-update.yml @@ -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