fix error #42
Workflow file for this run
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: Bundle & Push JSON schema | |
on: | |
push: | |
# branches: | |
# - main | |
# paths: | |
# - 'schemas/**' | |
jobs: | |
bundle-push-schemas: | |
runs-on: ubuntu-latest | |
name: bundle-and-push-schemas | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Create new branch | |
shell: bash | |
run: | | |
git config --global user.name github-actions[bot] | |
git config --global user.email github-actions[bot]@users.noreply.github.com | |
git checkout -b ci/update-schemas | |
git push -u origin ci/update-schemas | |
git checkout main | |
- name: Bundle & Push JSON schema for application schemas | |
uses: ./.github/actions/bundle-schema | |
with: | |
schema-path: ./schemas/applications/schema/application.schema.json | |
schema: application.schema.json | |
- name: Bundle & Push JSON schema for component-descriptions schemas | |
uses: ./.github/actions/bundle-schema | |
with: | |
schema-path: ./schemas/component-descriptions/schema/component.schema.json | |
schema: component.schema.json | |
- name: Bundle & Push JSON schema for controller schemas | |
uses: ./.github/actions/bundle-schema | |
with: | |
schema-path: ./schemas/controller-descriptions/schema/controller.schema.json | |
schema: controller.schema.json | |
- name: Checkout branch ci/update-schemas | |
uses: actions/checkout@v3 | |
with: | |
ref: ci/update-schemas | |
- name: Create pull request | |
shell: bash | |
run: | | |
MESSAGE=$( | |
gh pr create \ | |
-B develop \ | |
-H ci/update-schemas \ | |
--title 'Update schemas' \ | |
--body 'This PR was automatically created by GitHub actions in response to schema changes. Please review and update any impacted code before merging the changes.' \ | |
--reviewer jjenscodee \ | |
2>&1 | |
) || echo "::warning::Error creating the PR: $MESSAGE" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |