Skip to content

Update generated content #190

Update generated content

Update generated content #190

name: Update generated content
on:
schedule:
- cron: "0 10 * * 1-5"
workflow_dispatch:
permissions:
contents: read
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22.x
cache: "npm"
- name: Install dependencies
run: yarn install
- name: Prepare to fetch external content
run: |
git remote add -f -t main --no-tags examples https://github.com/score-spec/examples.git
git remote add -f -t main --no-tags community-provisioners https://github.com/score-spec/community-provisioners.git
git remote add -f -t main --no-tags score-compose https://github.com/score-spec/score-compose.git
git remote add -f -t main --no-tags score-k8s https://github.com/score-spec/score-k8s.git
git remote add -f -t main --no-tags patch-templates https://github.com/score-spec/community-patchers.git
# Set github actions bot as the committer, see https://github.com/actions/checkout/pull/1184
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Re-generate generated content
run: npm run gen-all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update generated content"
title: Update generated content
body: |
Update generated content.
branch: update-generated
signoff: true