diff --git a/.github/workflows/update-lockfiles.yml b/.github/workflows/update-lockfiles.yml new file mode 100644 index 0000000000..a45cc0a27c --- /dev/null +++ b/.github/workflows/update-lockfiles.yml @@ -0,0 +1,50 @@ +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" + - "**/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: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref }} + + - uses: oven-sh/setup-bun@v2 + + - name: Setup Ruby (bundle) + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.2 + bundler-cache: true + working-directory: example/ios + + - run: | + bun install + git add bun.lockb + + cd example + 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