Skip to content

Commit

Permalink
Merge pull request #65 from homoluctus/feature/migrate_to_yarn
Browse files Browse the repository at this point in the history
Integrate yarn from npm
  • Loading branch information
homoluctus authored Feb 11, 2020
2 parents 56b3815 + 481530b commit 76a6dcd
Show file tree
Hide file tree
Showing 7 changed files with 4,729 additions and 6,697 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: TS Lint Check
name: lint

on:
pull_request:
branches:
- master
paths:
- src/*

Expand All @@ -12,15 +10,35 @@ jobs:
name: Lint Check
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Setup TS
run: npm install tslint typescript -g
- name: Install prettier
run: yarn --frozen-lockfile

- name: Lint check with tslint
run: tslint './src/*.ts'
- name: Check
id: lint_check
run: |
result=$(yarn run lint)
echo "::set-output name=exit_code::$?"
echo "::set-output name=result::$result"
- uses: actions/[email protected]
if: failure() && steps.lint_check.outputs.result != ''
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '### Prettier\n{ steps.lint_check.outputs.result }}'
})
- name: Error exit
if: ${{ steps.lint_check.outputs.exit_code }} != '0'
run: exit 1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.node_repl_history
.config/
.npm/
node_modules/
node_modules/
yarn-error.log
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Slatify

![](https://github.com/homoluctus/slatify/workflows/TS%20Lint%20Check/badge.svg)
![GitHub Workflow](https://github.com/homoluctus/slatify/workflows/lint/badge.svg)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/homoluctus/slatify?color=brightgreen)
![GitHub](https://img.shields.io/github/license/homoluctus/slatify?color=brightgreen)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

This is Slack Notification for GitHub Actions.<br>
Generated from [actions/javascript-template](https://github.com/actions/javascript-template).

# ToC

- [Feature](#Feature)
- [Usage](#Usage)
- [Examples](#Examples)
- [Slack UI](#Slack%20UI)
- [Contribution](#Contribution)
- [LICENSE](#LICENSE)

# Feature
- Notify the result of GitHub Actions
- Support three job status (reference: [job-context](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#job-context))
Expand All @@ -17,7 +27,7 @@ Generated from [actions/javascript-template](https://github.com/actions/javascri
- Notify message to channel members efficiently
- You can specify the condition to mention

# How to use
# Usage
First of all, you need to set GitHub secrets for SLACK_WEBHOOK that is Incoming Webhook URL.<br>
You can customize the following parameters:

Expand Down Expand Up @@ -70,19 +80,20 @@ Please refer `action.yml` for more details.

<img src="./images/slack2.png" alt="Notification Preview" width="90%">

# Slack UI Example
# Slack UI

<img src="./images/slack.png" alt="Notification Preview" width="90%">

# Contribute
# Contribution

1. Fork this repository
2. Pull your repository in local machine
3. Update original repository
4. Checkout "master" branch based "remotes/origin/master" branch
5. Work on "master" branch
5. Work on "master" or other branch
6. Push you changes to your repository
7. Create a new Pull Request

# LICENSE

[The MIT License (MIT)](https://github.com/homoluctus/slatify/blob/master/LICENSE)
[The MIT License (MIT)](https://github.com/homoluctus/slatify/blob/master/LICENSE)
Loading

0 comments on commit 76a6dcd

Please sign in to comment.