mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2024-10-27 20:44:05 +00:00
GitHub Actions: introduce Template Verify workflow that verifies if the template repository is consistent with all provided content
This commit is contained in:
parent
095c2cb378
commit
fb31f95d06
1
.github/workflows/template-cleanup.yml
vendored
1
.github/workflows/template-cleanup.yml
vendored
@ -59,6 +59,7 @@ jobs:
|
||||
.github/readme \
|
||||
.github/template-cleanup \
|
||||
.github/workflows/template-cleanup.yml \
|
||||
.github/workflows/template-verify.yml \
|
||||
.idea/icon.png \
|
||||
src/main/kotlin/org \
|
||||
src/test/kotlin/org \
|
||||
|
40
.github/workflows/template-verify.yml
vendored
Normal file
40
.github/workflows/template-verify.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
# GitHub Actions Workflow verifies if the template repository is consistent with all provided content.
|
||||
|
||||
name: Template Verify
|
||||
on:
|
||||
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
|
||||
push:
|
||||
branches: [main]
|
||||
# Trigger the workflow on any pull request
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Template Verify
|
||||
if: github.event.repository.name == 'intellij-platform-plugin-template'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.properties.outputs.version }}
|
||||
changelog: ${{ steps.properties.outputs.changelog }}
|
||||
steps:
|
||||
|
||||
# Check out current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Compare `gradle.properties` with `.github/template-cleanup/gradle.properties`
|
||||
- name: Verify gradle.properties
|
||||
run: |
|
||||
echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
diff -U 0 \
|
||||
-I '^pluginVersion' \
|
||||
-I '^pluginGroup' \
|
||||
-I '^pluginName' \
|
||||
--label .github/template-cleanup/gradle.properties \
|
||||
--label gradle.properties \
|
||||
.github/template-cleanup/gradle.properties gradle.properties \
|
||||
>> $GITHUB_STEP_SUMMARY
|
||||
|
||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
Loading…
Reference in New Issue
Block a user