Skip to content

adding issue generation templates #23

adding issue generation templates

adding issue generation templates #23

name: Update Issue Templates
on:
push:
branches:
- main
paths:
- '.github/GEN_ISSUE_TEMPLATE/**'
workflow_dispatch:
schedule:
- cron: '0 0 * * 1' # Weekly on Mondays at 00:00 UTC
permissions:
contents: write
jobs:
update-templates:
runs-on: ubuntu-latest
steps:
- name: install cmipld
id: install-cmipld
uses: WCRP-CMIP/CMIPLD/actions/cmipld@main
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Run template generator
working-directory: ${{ github.workspace }}
run: template_update
continue-on-error: true
- name: Check for changes
id: check_changes
run: |
if ! git diff --quiet .github/ISSUE_TEMPLATE/; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
continue-on-error: true
- name: Commit and push changes
run: |
git config user.name "cmipld-actions[bot]"
git config user.email "[email protected]"
git add .github/ISSUE_TEMPLATE/*
git diff --staged --quiet || git commit -m "auto-update issue templates from GEN_ISSUE_TEMPLATE"
git push