Files
Dapper/.gitea/workflows/generate-build-info.yml
carpentryplus25 d83470d069
Some checks failed
Generate Build Info / build-info (push) Failing after 30s
Workflow Failure Attempt to fix 1
2026-03-05 09:57:08 -05:00

48 lines
1.1 KiB
YAML

name: Generate Build Info
on:
push:
branches:
- main
jobs:
build-info:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate build-info.php
run: |
SHORT_HASH=$(git rev-parse --short HEAD)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
DATE=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
mkdir -p dapper
cat > dapper/build-info.php << EOF
<?php
return [
'commit' => '$SHORT_HASH',
'branch' => '$BRANCH',
'built' => '$DATE',
];
EOF
- name: Commit file
run: |
git config --global user.name "Gitea Runner"
git config --global user.email "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