LOS restrict point of order submission to open lists (#1830) #80
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@v2 | |
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 | |
- 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: OpenSlides/openslides-autoupdate-service | |
token: ${{ secrets.AUTOUPDATE_ACCESS_TOKEN }} | |
client-payload: '{"body": "Triggered by commit [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})"}' |