Skip to content

Update Dependencies #101

Update Dependencies

Update Dependencies #101

Workflow file for this run

name: Update Dependencies
permissions:
pull-requests: write
repository-projects: write
contents: write
on:
schedule:
- cron: '0 3 * * 2'
workflow_dispatch:
jobs:
linter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
node-version: 14
- run: chmod +x "${GITHUB_WORKSPACE}/.github/scripts/build-file-linter.sh"
- run: '${GITHUB_WORKSPACE}/.github/scripts/build-file-linter.sh'
dot_only_linter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
node-version: 14
- run: chmod +x "${GITHUB_WORKSPACE}/.github/scripts/dot-only-test-linter.sh"
- run: '${GITHUB_WORKSPACE}/.github/scripts/dot-only-test-linter.sh'
eslint_linter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: node common/scripts/install-run-rush.js update
- run: node common/scripts/install-run-rush.js lint
prettier_linter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: node common/scripts/install-run-rush.js update
- run: node common/scripts/install-run-rush.js prettier
pr_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: node common/scripts/install-run-rush.js update
- run: node common/scripts/install-run-rush.js test
dependabot-update:
runs-on: ubuntu-latest
needs: [linter_job, dot_only_linter_job, eslint_linter_job, prettier_linter_job, pr_job]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
node-version: 14
- name: Update Lock File
run: node common/scripts/install-run-rush.js update
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
commit-message: Updated project dependencies
title: Update lock-file after Dependabot updates
body: Update lock-file after Dependabot updates
base: master
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
labels: automated-pr, dependabot-cleanup
branch: rush-lockfile-updates
delete-branch: true
- name: Check Outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: Merge PR
if: ${{ steps.cpr.outputs.pull-request-number }}
uses: 'pascalgn/automerge-action@v0.15.5'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
MERGE_METHOD: 'squash'
MERGE_RETRIES: '2'
MERGE_RETRY_SLEEP: '10000'
MERGE_REQUIRED_APPROVALS: '0'
UPDATE_METHOD: 'rebase'
PULL_REQUEST: '${{ steps.cpr.outputs.pull-request-number }}'