forked from ikatyang/emoji-cheat-sheet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
116 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Lint | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: "12" | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
|
||
- name: Lint | ||
run: yarn lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Test | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: "12" | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
|
||
- name: Test | ||
run: yarn test --ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Up to Date | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
update: | ||
name: Update | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: "12" | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
|
||
- name: Generate Cheat Sheet | ||
run: yarn generate | ||
|
||
- name: Push New Cheat Sheet to Updated Branch | ||
run: | | ||
git diff --name-only --exit-code && exit 0 | ||
git add README.md | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git commit -m "docs(readme): update emoji-cheat-sheet" | ||
git push -qf "https://${{ secrets.GITHUB_TOKEN }}@github.com/ikatyang/emoji-cheat-sheet.git" HEAD:github-actions-auto-update | ||
- name: Create PR from Updated Branch | ||
uses: actions/github-script@v2 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const {owner, repo} = context.repo | ||
const branch = 'github-actions-auto-update' | ||
const {status: branchStatus} = await github.repos.getBranch({ | ||
owner, | ||
repo, | ||
branch, | ||
}) | ||
if (branchStatus !== 200) { | ||
return | ||
} | ||
const {status, data: prs} = await github.pulls.list({ | ||
owner, | ||
repo, | ||
head: branch, | ||
state: 'open', | ||
}) | ||
if (status === 200 && prs.length === 0) { | ||
await github.pulls.create({ | ||
owner, | ||
repo, | ||
head: branch, | ||
title: 'docs(readme): update emoji-cheat-sheet', | ||
base: 'master', | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters