Skip to content

Commit fe8df90

Browse files
Merge pull request #240 from technote-space/chore/chore-sync-workflows
chore: sync workflows
2 parents 8034586 + 32e2ff7 commit fe8df90

File tree

3 files changed

+22
-30
lines changed

3 files changed

+22
-30
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,11 @@ jobs:
4444
run: yarn install
4545
if: env.RUNNING
4646
- name: Check code style
47-
run: yarn eslint ${{ env.GIT_DIFF }}
48-
if: env.RUNNING
49-
- uses: 8398a7/action-slack@v2
50-
with:
51-
status: failure
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
55-
if: failure()
47+
run: yarn eslint ${{ env.GIT_DIFF_FILTERED }}
48+
if: env.RUNNING && env.GIT_DIFF_FILTERED
49+
- name: Check code style
50+
run: yarn lint
51+
if: env.RUNNING && !env.GIT_DIFF_FILTERED
5652

5753
cover:
5854
name: Coverage
@@ -84,7 +80,7 @@ jobs:
8480
run: echo "::set-env name=RUNNING::"
8581
if: "! env.GIT_DIFF"
8682
- name: Set running flag
87-
if: matrix.node == '12' && github.ref == join('refs/heads/', github.event.repository.default_branch)
83+
if: matrix.node == '12' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
8884
run: echo "::set-env name=RUNNING::1"
8985
- name: Set running flag
9086
run: |
@@ -124,13 +120,6 @@ jobs:
124120
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
125121
COVERAGE_FILE: ./coverage/lcov.info
126122
if: env.RUNNING && matrix.node == '12'
127-
- uses: 8398a7/action-slack@v2
128-
with:
129-
status: failure
130-
env:
131-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
133-
if: failure()
134123

135124
package:
136125
name: Publish Package
@@ -202,13 +191,6 @@ jobs:
202191
env:
203192
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
204193
if: env.RUNNING && matrix.target == 'gpr'
205-
- uses: 8398a7/action-slack@v2
206-
with:
207-
status: failure
208-
env:
209-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
210-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
211-
if: failure()
212194

213195
publishRelease:
214196
name: Create Release
@@ -234,11 +216,21 @@ jobs:
234216
env:
235217
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
236218
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
237-
if: always() && steps.drafter.outputs.html_url
219+
if: success()
220+
221+
slack:
222+
name: Slack
223+
needs: publishRelease
224+
runs-on: ubuntu-latest
225+
if: always()
226+
steps:
227+
- uses: technote-space/workflow-conclusion-action@gh-actions
228+
with:
229+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
238230
- uses: 8398a7/action-slack@v2
239231
with:
240-
status: ${{ job.status }}
232+
status: failure
241233
env:
242234
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
243235
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
244-
if: always() && ! steps.drafter.outputs.html_url
236+
if: env.WORKFLOW_CONCLUSION == 'failure'

.github/workflows/pr-opened.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
uses: technote-space/create-project-card-action@v1
1414
with:
1515
PROJECT: Backlog
16-
COLUMN: To do
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
COLUMN: In progress
17+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
1818

1919
assignAuthor:
2020
name: Assign author to PR

.github/workflows/project-card-moved.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
project_card:
3-
types: [moved]
3+
types: [created, moved]
44

55
name: Project Card Event
66

0 commit comments

Comments
 (0)