builds, initial testing builds, packaging, ci workflow
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 2m1s
Comprehensive CI/CD Pipeline / Security Audit (push) Successful in 46s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 1m7s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 2m1s
Comprehensive CI/CD Pipeline / Security Audit (push) Successful in 46s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 1m7s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
This commit is contained in:
parent
0e80b08b0a
commit
45c124637b
25 changed files with 1994 additions and 6 deletions
64
.forgejo/workflows/update-readme.yml.disabled
Normal file
64
.forgejo/workflows/update-readme.yml.disabled
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
name: Update README
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build Deb-Mock Package", "Test Deb-Mock Build"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
update-readme:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.workflow_run.conclusion == 'success'
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone https://git.raines.xyz/robojerk/deb-mock.git /tmp/deb-mock
|
||||
cp -r /tmp/deb-mock/* .
|
||||
cp -r /tmp/deb-mock/.* . 2>/dev/null || true
|
||||
|
||||
- name: Set up Python
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y python3.12 python3.12-venv python3-pip
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Update README with build status
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
python -c "
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
# Read current README
|
||||
with open('README.md', 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
# Update last updated timestamp
|
||||
timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S UTC')
|
||||
|
||||
# Update last updated
|
||||
if 'Last updated:' in content:
|
||||
content = re.sub(r'Last updated:.*', f'Last updated: {timestamp}', content)
|
||||
else:
|
||||
# Add after the title
|
||||
content = content.replace('# Deb-Mock', f'# Deb-Mock\n\n**Last updated: {timestamp}**')
|
||||
|
||||
# Write updated README
|
||||
with open('README.md', 'w') as f:
|
||||
f.write(content)
|
||||
"
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git config --local user.email "action@forgejo.com"
|
||||
git config --local user.name "Forgejo Action"
|
||||
git add README.md
|
||||
git diff --quiet && git diff --staged --quiet || git commit -m "Update README with build status"
|
||||
git push
|
||||
Loading…
Add table
Add a link
Reference in a new issue