workflows: git diff returns 1 on diff opposed to error

This commit is contained in:
extremeheat
2025-09-06 23:08:16 +00:00
parent 44b33c7dd1
commit 4931a8dadc
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ const failOnError = process.env.FAIL_ON_ERROR === 'true'
// Save some time by skipping old versions as we are not parallelizing builds // Save some time by skipping old versions as we are not parallelizing builds
const versions = require('../../versions.json') const versions = require('../../versions.json')
const SKIP_VERSIONS = versions.slice(0, versions.indexOf('1.21.3')) const SKIP_VERSIONS = versions.slice(0, -2) // all but last 2 versions
async function main () { async function main () {
+6 -1
View File
@@ -67,5 +67,10 @@ jobs:
ref: client${{ steps.sb.outputs.second_latest_version }} ref: client${{ steps.sb.outputs.second_latest_version }}
fetch-depth: 1 fetch-depth: 1
- run: ls mc-source
- name: Write diff - name: Write diff
run: cd mc-source && git diff --no-index ${{ steps.sb.outputs.second_latest_version }} ${{ steps.sb.outputs.latest_version }} > ${{ steps.sb.outputs.second_latest_version }}_to_${{ steps.sb.outputs.latest_version }}.diff # NOTE: this returns exit code 1 if there are differences
run: git diff --no-index ${{ steps.sb.outputs.second_latest_version }} ${{ steps.sb.outputs.latest_version }} > ${{ steps.sb.outputs.second_latest_version }}_to_${{ steps.sb.outputs.latest_version }}.diff
working-directory: mc-source
continue-on-error: true