Skip to content

chore: sync workflows #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 19 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@ jobs:
run: yarn install
if: env.RUNNING
- name: Check code style
run: yarn eslint ${{ env.GIT_DIFF }}
if: env.RUNNING
- uses: 8398a7/action-slack@v2
with:
status: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
run: yarn eslint ${{ env.GIT_DIFF_FILTERED }}
if: env.RUNNING && env.GIT_DIFF_FILTERED
- name: Check code style
run: yarn lint
if: env.RUNNING && !env.GIT_DIFF_FILTERED

cover:
name: Coverage
Expand Down Expand Up @@ -84,7 +80,7 @@ jobs:
run: echo "::set-env name=RUNNING::"
if: "! env.GIT_DIFF"
- name: Set running flag
if: matrix.node == '12' && github.ref == join('refs/heads/', github.event.repository.default_branch)
if: matrix.node == '12' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
run: echo "::set-env name=RUNNING::1"
- name: Set running flag
run: |
Expand Down Expand Up @@ -124,13 +120,6 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERAGE_FILE: ./coverage/lcov.info
if: env.RUNNING && matrix.node == '12'
- uses: 8398a7/action-slack@v2
with:
status: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

package:
name: Publish Package
Expand Down Expand Up @@ -202,13 +191,6 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.RUNNING && matrix.target == 'gpr'
- uses: 8398a7/action-slack@v2
with:
status: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

publishRelease:
name: Create Release
Expand All @@ -234,11 +216,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always() && steps.drafter.outputs.html_url
if: success()

slack:
name: Slack
needs: publishRelease
runs-on: ubuntu-latest
if: always()
steps:
- uses: technote-space/workflow-conclusion-action@gh-actions
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: 8398a7/action-slack@v2
with:
status: ${{ job.status }}
status: failure
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always() && ! steps.drafter.outputs.html_url
if: env.WORKFLOW_CONCLUSION == 'failure'
4 changes: 2 additions & 2 deletions .github/workflows/pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
uses: technote-space/create-project-card-action@v1
with:
PROJECT: Backlog
COLUMN: To do
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COLUMN: In progress
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

assignAuthor:
name: Assign author to PR
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project-card-moved.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
project_card:
types: [moved]
types: [created, moved]

name: Project Card Event

Expand Down