-
Notifications
You must be signed in to change notification settings - Fork 99
67 lines (59 loc) · 1.71 KB
/
update-lockfiles.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
60
61
62
63
64
65
66
67
name: 'Update Lockfiles (bun.lockb + Podfile.lock)'
on:
push:
branches:
- main
paths:
- ".github/workflows/update-lockfiles.yml"
pull_request:
paths:
- ".github/workflows/update-lockfiles.yml"
- "package.json"
- "example/package.json"
permissions:
contents: write
jobs:
update-lockfiles:
name: "Update lockfiles (bun.lockb + Podfile.lock)"
if: github.actor == 'dependabot[bot]'
runs-on: macOS-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
working-directory: example/ios
- name: Restore Pods cache
uses: actions/cache@v4
with:
path: |
example/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Gems
working-directory: example/ios
run: bundle config set deployment 'true' && bundle install
- name: Update & Commit Lockfiles
run: |
bun install
git add bun.lockb
cd example
bun install
bun pods
git add ios/Podfile.lock
cd ..
git config --global user.name 'dependabot[bot]'
git config --global user.email 'dependabot[bot]@users.noreply.github.com'
git commit --amend --no-edit
git push --force