Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #135 from technote-space/chore/chore-sync-workflows
Browse files Browse the repository at this point in the history
chore: sync workflows
  • Loading branch information
technote-space authored Dec 24, 2020
2 parents e248c87 + 359dc4d commit 7028e4d
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 10 deletions.
10 changes: 9 additions & 1 deletion .github/workflow-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@
"TOC_MAX_HEADER_LEVEL": "3",
"TOC_TITLE": "Details",
"TOC_CREATE_PR": "true",
"BRANCH_PREFIX": "release/"
"TOC_TARGET_PATHS": "README*.md",
"BRANCH_PREFIX": "release/",
"ANNOTATION_EXCLUDE_PATTERNS": [
"warning jest",
"warning babel-jest",
"Cloning into",
"has unmet peer dependency",
"has incorrect peer dependency"
]
}
3 changes: 2 additions & 1 deletion .github/workflows/add-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- name: Get version
uses: technote-space/get-next-version-action@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/add-test-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: actions/checkout@v2
- uses: technote-space/get-git-comment-action@v1
- name: Get version
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/check-warnings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
workflow_run:
workflows:
- CI
- Sync workflows
- Update dependencies
- Broken Link Check
types:
- completed

name: Check Warnings

jobs:
annotations:
name: Annotations
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/download-annotations-action@v1
id: annotations
with:
TARGET_RUN_ID: ${{ github.event.workflow_run.id }}
INCLUDE_LEVELS: warning
EXCLUDE_MESSAGE_PATTERNS: ${{ env.ANNOTATION_EXCLUDE_PATTERNS }}
- name: Build attachments
run: |
arr1='[{"fields":[{"title":"repo","value":"<https://github.com/${{ github.repository }}|${{ github.repository }}>","short":true},{"title":"action","value":"<${{ github.event.workflow_run.html_url }}|summary>","short":true}]}]'
arr2=$(echo '${{ steps.annotations.outputs.messages }}' | jq -c 'map({"color":"warning","text":"```\(.)```"})')
echo "SLACK_ATTACHMENTS=$(jq --argjson arr1 "$arr1" --argjson arr2 "$arr2" -nc '$arr1 + $arr2')" >> $GITHUB_ENV
if: steps.annotations.outputs.number > 0
- uses: 8398a7/action-slack@v3
with:
status: custom
fields: repo
custom_payload: |
{
text: "Warning annotations",
attachments: ${{ env.SLACK_ATTACHMENTS }}
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: steps.annotations.outputs.number > 0 && env.SLACK_WEBHOOK_URL
3 changes: 2 additions & 1 deletion .github/workflows/issue-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/create-project-card-action@v1
with:
PROJECT: ${{ env.PROJECT }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/create-project-card-action@v1
with:
PROJECT: ${{ env.PROJECT }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/pr-updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/pr-commit-body-action@v1
with:
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
Expand All @@ -37,7 +38,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/release-type-action@v1
with:
EXCLUDE_MESSAGES: ${{ env.EXCLUDE_MESSAGES }}
Expand All @@ -51,7 +53,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- name: Set running flag
run: echo "RUNNING=1" >> $GITHUB_ENV
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
steps:
- uses: technote-space/load-config-action@v1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/toc-generator@v3
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
Expand All @@ -22,3 +23,4 @@ jobs:
MAX_HEADER_LEVEL: ${{ env.TOC_MAX_HEADER_LEVEL }}
TOC_TITLE: ${{ env.TOC_TITLE }}
CREATE_PR: ${{ env.TOC_CREATE_PR }}
TARGET_PATHS: ${{ env.TOC_TARGET_PATHS }}
3 changes: 2 additions & 1 deletion .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
- uses: technote-space/load-config-action@v1
if: env.RUNNING1
with:
CONFIG_FILENAME: workflow-settings.json
CONFIG_FILENAME: workflow-settings.json, workflow-details.json
IGNORE_WARNING: 'true'
- uses: technote-space/auto-cancel-redundant-workflow@v1
if: env.RUNNING1
with:
Expand Down

0 comments on commit 7028e4d

Please sign in to comment.