Skip to content

Update supported distros #37

Update supported distros

Update supported distros #37

name: Update supported distros
on:
schedule:
- cron: '30 6 * * 1' # Runs every Monday at 8:30 AM CEST (6:30 UTC)
workflow_dispatch: # Allow manual triggering
jobs:
update_distros:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
actions: write
issues: write
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: "1839676"
private-key: ${{ secrets.PARETO_BOT_SECRET }}
- name: Checkout repository
uses: actions/checkout@v5
with:
token: ${{ steps.app-token.outputs.token }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/workflows/requirements.txt
- name: Update supported distros
id: update
run: python .github/workflows/scripts/update_supported_distros.py
- name: Create Pull Request
if: steps.update.outputs.changes_made == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: "Update supported distro versions"
title: "Update versions of distros we test against"
body: ${{ steps.update.outputs.pr_description }}
branch: update/distro-versions-${{ github.run_number }}
delete-branch: true
- name: DeadManSwitch ping
if: success()
run: |
echo "Notifying Dead Man's Snitch of successful workflow completion"
curl -s https://nosnch.in/ba608c34d1
- name: Create failure summary
if: failure()
run: |
cat >> $GITHUB_STEP_SUMMARY << 'EOF'
## ❌ Update Supported Distros Workflow Failed
The automated workflow to update supported Linux distros has failed.
| Property | Value |
|----------|-------|
| **Workflow Run** | [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |
| **Branch** | `${{ github.ref }}` |
| **Triggered by** | ${{ github.actor }} |
### This workflow attempts to:
1. Check for new distro versions on [endoflife.date](https://endoflife.date/)
2. Update the `distro.yml` file with new versions
3. Create a pull request with the changes
Please check the [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for detailed error information.
EOF