subosito/flutter-action

How to apply a patch in flutter directory ?

Ortes opened this issue · 4 comments

Ortes commented

I want to apply a patch from this PR how to proceed ?
On my local machine i use the following in the flutter directory:

curl https://patch-diff.githubusercontent.com/raw/flutter/flutter/pull/137874.patch > intrinsic.patch
git apply intrinsic.patch

How can I do the same from my CI ?

I have a question like you, and I have a workaround, you can try it:

jobs:
  auto-build:
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v4
    - uses: subosito/flutter-action@v2
      with:
        flutter-version: '3.22.2'
        channel: 'stable'
        cache: true
    - run: |
        flutter --version
        cd ${{ env.FLUTTER_ROOT }}
        curl https://patch-diff.githubusercontent.com/raw/flutter/flutter/pull/137874.patch | git apply
        git status