Generate Updates #11
This file contains 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: Generate Updates | |
on: | |
push: | |
paths: | |
- "updates/*.json" | |
workflow_dispatch: | |
jobs: | |
combine: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Combine updates | |
run: bash ./updates/buildUpdates.sh | |
- name: Commit and push | |
if: github.repository == 'vanilla-os/info' && github.ref == 'refs/heads/main' | |
continue-on-error: true | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add updates/_index.json | |
git commit -m "chore: new updates index" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
generate-feed: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
cache-dependency-path: scripts/pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile --filter=./scripts | |
- name: Generate feed | |
run: node ./scripts/generateUpdatesFeed.cjs | |
- name: Commit and push | |
if: github.repository == 'vanilla-os/info' && github.ref == 'refs/heads/main' | |
continue-on-error: true | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add updates-feed.xml | |
git commit -m "chore: new updates index" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |