Skip to content

add validate_instance #1

add validate_instance

add validate_instance #1

---
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:

Check failure on line 46 in .github/workflows/create-issue-for-file-updates.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/create-issue-for-file-updates.yml

Invalid workflow file

You have an error in your yaml syntax on line 46
- 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 }})"}'