add 3 fields default_number, default_structure_level and default_vote… #8
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: Create issues if global files change | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'global/meta/models.yml' | ||
- 'global/meta/permission.yml' | ||
jobs: | ||
announce-update: | ||
name: 'Announce updates' | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'OpenSlides' | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
- name: Create Issue if models.yml was changed | ||
if: contains(steps.changed-files.outputs.modified_files, 'global/meta/models.yml') | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OS_ISSUE_TITLE: The `models.yml` got updated | ||
OS_FILE_NAME: models.yml | ||
with: | ||
filename: .github/workflows/announce-file-changes-template.md | ||
- name: Create Issue if permission.yml was changed | ||
if: contains(steps.changed-files.outputs.modified_files, 'global/meta/permission.yml') | ||
uses: JasonEtco/create-an-issue@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OS_ISSUE_TITLE: The `permission.yml` got updated | ||
OS_FILE_NAME: permission.yml | ||
with: | ||
filename: .github/workflows/announce-file-changes-template.md | ||
steps: | ||
- name: Generate access token | ||
uses: tibdex/github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.AUTOMATION_APP_ID }} | ||
private_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} | ||
- name: Send dispatch if models.yml or permission.yml was changed | ||
if: | | ||
contains(steps.changed-files.outputs.modified_files, 'global/meta/models.yml') || | ||
contains(steps.changed-files.outputs.modified_files, 'global/meta/permission.yml') | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
event-type: models-update | ||
repository: ${{ github.repository_owner }}/openslides-autoupdate-service | ||
token: ${{ steps.generate-token.outputs.token }} | ||
client-payload: '{"body": "Triggered by commit [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})"}' |