EOL check #112
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: EOL check | |
on: | |
schedule: | |
- cron: "0 7 * * *" | |
permissions: | |
contents: write | |
jobs: | |
generate-ics: | |
runs-on: ubuntu-latest | |
container: debian:trixie | |
steps: | |
- name: Install system dependencies | |
run: | | |
apt-get update | |
apt-get install -y python3-poetry git | |
- uses: actions/create-github-app-token@v2 | |
id: app-token | |
with: | |
app-id: ${{ vars.FPF_BRANCH_UPDATER_APP_ID }} | |
private-key: ${{ secrets.FPF_BRANCH_UPDATER_APP_PRIVKEY }} | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
persist-credentials: false | |
- name: Install Python deps and build calendar | |
run: | | |
poetry install --no-interaction | |
poetry run python eol_check.py generate-ics eol.yaml eol.ics | |
working-directory: eol-check | |
- name: Set some git configs | |
run: | | |
git config --global --add safe.directory '*' | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Commit updated calendar | |
env: | |
GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
run: | | |
git add eol-check/eol.ics | |
if git diff --staged --quiet; then | |
echo "No calendar changes; skip commit." | |
else | |
git commit -m "chore: update EOL calendar" | |
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
git push | |
fi | |
open-issues: | |
runs-on: ubuntu-latest | |
container: debian:trixie | |
steps: | |
- name: Install system dependencies | |
run: | | |
apt-get update | |
apt-get install -y python3-poetry git gh | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Pythen deps and open issues | |
env: | |
GH_TOKEN: ${{ secrets.ISSUES_TOKEN }} | |
run: | | |
poetry install --no-interaction | |
poetry run python eol_check.py open-issues eol.yaml | |
working-directory: eol-check |