Skip to content

Commit

Permalink
ci: fix dependabot push
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioramos committed Aug 25, 2020
1 parent 8ea2e03 commit e0a9afe
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 80 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/on-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,42 @@ name: Continuous Updates
on:
push:
branches: [ dependabot/** ]
pull_request:
types: [opened, synchronize, reopened]
branches: [ dependabot/** ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
fetch-depth: 20
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: |
git checkout ${{ github.base_ref }} yarn.lock
git checkout ${{ github.sha }}^ -- yarn.lock
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
- name: Get branch
uses: rlespinasse/github-slug-action@2.0.0
- name: Push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.GITHUB_REF_SLUG }}
force: true
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@
"apr-intercept": "^3.0.4",
"apr-main": "^4.0.3",
"apr-reduce": "^3.0.3",
"ava": "^3.11.1",
"ava": "^3.12.1",
"directory-tree": "^2.2.4",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-xo-space": "^0.25.0",
"execa": "^4.0.3",
"hasha": "^5.2.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"lint-staged": "^10.2.12",
"markdown-table": "^2.0.0",
"path-type": "^4.0.0",
"prettier": "^2.0.5",
"prettier": "^2.1.0",
"pretty-bytes": "^5.3.0",
"pretty-ms": "^7.0.0"
},
Expand Down

0 comments on commit e0a9afe

Please sign in to comment.