Skip to content

ci: use rss way to poll changes from upstream #8

ci: use rss way to poll changes from upstream

ci: use rss way to poll changes from upstream #8

name: (Cron) Poll changes from upstream repo (chaotic/nyx)
on:
workflow_dispatch:
schedule:
# Run this Action every day at 1:00am UTC
- cron: '0 1 * * *'
push:
branches:
- poll-changes-from-nyx
env:
CHARACTER_LIMIT: 1000
MAX_AGE: 14d
jobs:
poll-upstream-changes:
runs-on: ubuntu-latest
permissions:
issues: write
strategy:
matrix:
include:
- project: nyx
labels: chaotic-cx/nyx
path: pkgs/linux-cachyos/versions-hardened.json
feed: https://github.com/chaotic-cx/nyx/commits/main/pkgs/linux-cachyos/versions-hardened.json.atom
fail-fast: false
steps:
- name: Generate GitHub Auth Token
# https://github.com/tibdex/github-app-token
id: generate_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
# - name: Poll changes from GitHub repo
# # https://github.com/poll-github-repo/action
# uses: poll-github-repo/action@v1
# with:
# token: ${{ steps.generate_token.outputs.token }}
# yes-create-issues: true
# cache-path: .github/artifacts/${{ matrix.path }}.last-sync
# repo-to-sync: ${{ matrix.repo }}
# path-to-sync: ${{ matrix.path }}
# tracking-issue-label: ${{ matrix.label }}
# tracking-issue-title: "[Sync] Updates on ${{ matrix.repo }} {{ path }}: {{ sha-short }}"
# tracking-issue-body: |
# ## Summary
# New commit in ${{ matrix.repo }} ({{ commit-date }}) ({{ sha-full }}):
# {{ message }} [link]({{ url }})
- name: Post changes to GitHub issue
uses: git-for-windows/rss-to-issues@v0
# https://github.com/marketplace/actions/rss-to-issues
with:
github-token: ${{ steps.generate_token.outputs.token }}
feed: ${{ matrix.feed }}
prefix: "[New ${{ matrix.project }} changes]"
character-limit: ${{ env.CHARACTER_LIMIT }}
dry-run: false
max-age: ${{ env.MAX_AGE }}
labels: github/repo-content,automated-issue,${{ matrix.labels }}