Created
September 5, 2021 09:36
-
-
Save giuseppeg/0ef7da2cb168ee4e3bb669b823fd0f67 to your computer and use it in GitHub Desktop.
github workflow (action) to update dependencis
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
name: Update Dependencies | |
on: | |
schedule: | |
# https://crontab.guru/#0_0_*_*_WED,SAT | |
# Run every Wednesday and Saturday at 00:00 | |
# 0 0 * * WED,SAT | |
- cron: '0 0 * * WED,SAT' | |
jobs: | |
dependabot: | |
runs-on: ubuntu-latest | |
name: Update Dependencies | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@master | |
- name: Check outdated dependencies and prepare | |
run: | | |
git config user.name 'Dependabot' | |
git config user.email '[email protected]' | |
yarn outdated || yarn upgrade && git add . && git commit -m "Update Dependencies" | |
- name: Create PR | |
if: ${{ success() }} | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
title: Update Dependencies | |
body: | | |
Automatic dependencies upgrade. | |
Note: major version updates were not installed. After merging this PR run yarn outdate to see if there is any major version. | |
branch: update-dependencies | |
branch-suffix: timestamp | |
delete-branch: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment