From d83470d0692a5764d30296e528065f4567f238fe Mon Sep 17 00:00:00 2001 From: carpentryplus25 Date: Thu, 5 Mar 2026 09:57:08 -0500 Subject: [PATCH] Workflow Failure Attempt to fix 1 --- .gitea/workflows/generate-build-info.yml | 44 ++++++++++-------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/.gitea/workflows/generate-build-info.yml b/.gitea/workflows/generate-build-info.yml index 093ebdf..b9c6f77 100644 --- a/.gitea/workflows/generate-build-info.yml +++ b/.gitea/workflows/generate-build-info.yml @@ -1,22 +1,17 @@ -name: Generate Build Info (Commit Hash) +name: Generate Build Info on: push: branches: - main - pull_request: - branches: - - main - release: - types: [published] jobs: build-info: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: https://github.com/actions/checkout@v4 + - name: Checkout repo + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -26,28 +21,27 @@ jobs: BRANCH=$(git rev-parse --abbrev-ref HEAD) DATE=$(date -u '+%Y-%m-%d %H:%M:%S UTC') - mkdir -p dapper # Ensure folder exists + mkdir -p dapper cat > dapper/build-info.php << EOF '$SHORT_HASH', - 'branch' => '$BRANCH', - 'built' => '$DATE', + 'commit' => '$SHORT_HASH', + 'branch' => '$BRANCH', + 'built' => '$DATE', ]; EOF - echo "Generated build-info.php with commit $SHORT_HASH" + - name: Commit file + run: | + git config --global user.name "Gitea Runner" + git config --global user.email "ampedlease@ampedlease.com" - - name: Commit build-info.php if changed - uses: https://github.com/stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "chore: update build-info.php [ci skip]" - file_pattern: dapper/build-info.php - skip_fetch: true - skip_checkout: true - commit_user_name: "Automated Build" - commit_user_email: "ampedlease@ampedlease.com" - commit_author: "Automated Build " + git add dapper/build-info.php + + if git diff --cached --quiet; then + echo "No changes to commit" + else + git commit -m "auto: update build info [skip ci]" + git push + fi