* Added schema sync workflow

* Update changelog
This commit is contained in:
Armaan Mcleod 2022-02-10 11:06:09 +11:00 коммит произвёл GitHub
Родитель e44b99659e
Коммит d024de4deb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 50 добавлений и 0 удалений

48
.github/workflows/schema.yaml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,48 @@
name: SyncPSRuleSchema
on:
schedule:
- cron: '0 0 * * 1' # At 12:00 AM, only on Monday
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
if: github.repository == 'microsoft/PSRule-vscode'
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
- name: Checkout PSRule
uses: actions/checkout@v2.4.0
with:
repository: microsoft/PSRule
path: PSRule
- name: Configure
run: |
git config user.name github-actions
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Copy Schemas
run: |
$sourceSchemaDirectory = [System.IO.Path]::Combine($env:GITHUB_WORKSPACE, 'PSRule', 'schemas')
$sourceSchemaFiles = Get-ChildItem -Path $sourceSchemaDirectory -File -Filter *.schema.json
$sourceSchemaFiles | ForEach-Object { Copy-Item -Path $_.FullName -Destination schemas }
shell: pwsh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3.12.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Sync PSRule Schema
title: Sync PSRule Schema
body: 'Updates to JSON schema files'
delete-branch: true

Просмотреть файл

@ -17,6 +17,8 @@ Continue reading to see the changes included in the latest version.
- Added resources snippets for JSON and JSONC files. [#477](https://github.com/microsoft/PSRule-vscode/issues/477)
- Update schema for suppression groups. [#574](https://github.com/microsoft/PSRule-vscode/issues/574)
- Add resource snippets for Suppression Groups. [#588](https://github.com/microsoft/PSRule-vscode/issues/588)
- Engineering:
-Added Add workflow to sync PSRule schemas. [#592](https://github.com/microsoft/PSRule-vscode/issues/592)
## v1.7.0