Skip to content

Commit

Permalink
ci: add dependabot support
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioramos committed Aug 25, 2020
1 parent 4d9aced commit 6c0dd99
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
commit-message:
prefix: 'chore'
include: 'scope'
versioning-strategy: increase-if-necessary
38 changes: 38 additions & 0 deletions .github/workflows/on-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Continuous Updates

on:
push:
branches: [ dependabot/** ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
persist-credentials: false
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Autofix lockfile
run: yarn
env:
YARN_CHECKSUM_BEHAVIOR: update
YARN_ENABLE_SCRIPTS: 0
- name: Config Git
run: |
# use personal access token to allow triggering new workflow
BASIC_AUTH=$(echo -n "x-access-token:${{ secrets.GITHUB_TOKEN }}" | base64)
echo "::add-mask::$BASIC_AUTH"
git config --global user.name '${{ github.event.commits[0].author.name }}'
git config --global user.email '${{ github.event.commits[0].author.email }}'
git config --local http.$GITHUB_SERVER_URL/.extraheader "AUTHORIZATION: basic $BASIC_AUTH"
- name: Commit changes
run: |
git add yarn.lock
git commit --amend --no-edit -n
git push --force-with-lease

0 comments on commit 6c0dd99

Please sign in to comment.