forked from OSC/ondemand
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.54 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Update Dependencies
on:
workflow_dispatch:
schedule:
# every Monday morning
- cron: '0 3 * * 1'
jobs:
update-dependencies:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
ruby: ["3"]
runs-on: ${{ matrix.os }}
name: Update Dependencies
steps:
- name: Checkout ${{ github.sha }}
uses: actions/checkout@v3
- name: Setup Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/vendor/bundle
key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('apps/*/Gemfile.lock') }}
- name: Setup os dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsqlite3-dev
- name: Setup Bundler
run: |
bundle config path ~/vendor/bundle
bundle install
- name: Run Rake Update
run: bundle exec rake update
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.OSC_ROBOT_GH_PUB_REPO_TOKEN }}
commit-message: update dependencies
committer: OSC ROBOT <[email protected]>
author: osc-bot <[email protected]>
delete-branch: true
title: 'Update Dependencies'
push-to-fork: osc-bot/ondemand
branch: osc-bot/dep-updates
body: |
Update dependencies generated from `rake update`