Workflow Failure Attempt to fix 1
Some checks failed
Generate Build Info / build-info (push) Failing after 30s

This commit is contained in:
carpentryplus25
2026-03-05 09:57:08 -05:00
parent 3dc15790f1
commit d83470d069

View File

@@ -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
<?php
// Auto-generated build metadata - DO NOT EDIT manually
// Generated on: $DATE
return [
'commit' => '$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 <ampedlease@ampedlease.com>"
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