diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 5eaf268..3124e1e 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -12,17 +12,18 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + run: | + git clone ${{ github.server_url }}/${{ github.repository }} . + git checkout ${{ github.sha }} - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.12' + run: | + sudo apt update + sudo apt install -y python3.12 python3.12-venv python3-pip - name: Install system dependencies run: | - sudo apt update - sudo apt install -y sbuild schroot debootstrap python3-venv python3-pip + sudo apt install -y sbuild schroot debootstrap - name: Create deb-mock directories run: | @@ -56,14 +57,9 @@ jobs: source venv/bin/activate python setup.py sdist bdist_wheel - - name: Upload build artifacts - uses: actions/upload-artifact@v3 - with: - name: deb-mock-package - path: dist/ - - - name: Upload coverage reports - uses: actions/upload-artifact@v3 - with: - name: coverage-reports - path: coverage.xml \ No newline at end of file + - name: List artifacts + run: | + echo "Build artifacts created:" + ls -la dist/ + echo "Coverage report:" + ls -la coverage.xml \ No newline at end of file diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index d9404e0..68992a5 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -11,17 +11,18 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + run: | + git clone ${{ github.server_url }}/${{ github.repository }} . + git checkout ${{ github.sha }} - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.12' + run: | + sudo apt update + sudo apt install -y python3.12 python3.12-venv python3-pip - name: Install system dependencies run: | - sudo apt update - sudo apt install -y sbuild schroot debootstrap python3-venv python3-pip + sudo apt install -y sbuild schroot debootstrap - name: Set up virtual environment run: | @@ -50,33 +51,9 @@ jobs: source venv/bin/activate twine check dist/* - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - - name: Upload Release Assets - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/deb_mock-${{ github.ref_name }}.tar.gz - asset_name: deb-mock-${{ github.ref_name }}.tar.gz - asset_content_type: application/gzip - - - name: Upload Wheel - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/deb_mock-${{ github.ref_name }}-py3-none-any.whl - asset_name: deb-mock-${{ github.ref_name }}-py3-none-any.whl - asset_content_type: application/zip \ No newline at end of file + - name: List release artifacts + run: | + echo "Release artifacts created:" + ls -la dist/ + echo "Tag: ${{ github.ref_name }}" + echo "Repository: ${{ github.repository }}" \ No newline at end of file diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 3ea2400..679ee9b 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -12,17 +12,18 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + run: | + git clone ${{ github.server_url }}/${{ github.repository }} . + git checkout ${{ github.sha }} - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.12' + run: | + sudo apt update + sudo apt install -y python3.12 python3.12-venv python3-pip - name: Install system dependencies run: | - sudo apt update - sudo apt install -y sbuild schroot debootstrap python3-venv python3-pip + sudo apt install -y sbuild schroot debootstrap - name: Create deb-mock directories run: | diff --git a/.forgejo/workflows/update-readme.yml b/.forgejo/workflows/update-readme.yml index 0892b72..1b641cd 100644 --- a/.forgejo/workflows/update-readme.yml +++ b/.forgejo/workflows/update-readme.yml @@ -13,12 +13,14 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + run: | + git clone ${{ github.server_url }}/${{ github.repository }} . + git checkout ${{ github.sha }} - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.12' + run: | + sudo apt update + sudo apt install -y python3.12 python3.12-venv python3-pip - name: Install dependencies run: | @@ -37,25 +39,15 @@ jobs: with open('README.md', 'r') as f: content = f.read() - # Update build status - build_status = f'![Build Status](https://github.com/{{\"{{ github.repository }}\"}}/workflows/Build%20Deb-Mock%20Package/badge.svg)' - # Update last updated timestamp timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S UTC') - # Replace or add build status - if '![Build Status]' in content: - content = re.sub(r'!\[Build Status\].*', build_status, content) - else: - # Add after the title - content = content.replace('# Deb-Mock', f'# Deb-Mock\n\n{build_status}') - # Update last updated if 'Last updated:' in content: content = re.sub(r'Last updated:.*', f'Last updated: {timestamp}', content) else: - # Add after build status - content = content.replace(build_status, f'{build_status}\n\nLast updated: {timestamp}') + # 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: @@ -64,8 +56,8 @@ jobs: - name: Commit and push changes run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" + 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 \ No newline at end of file