subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.28k stars 202 forks source link

How to apply a patch in flutter directory ? #310

Closed Ortes closed 6 hours ago

Ortes commented 6 months ago

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 ?

thaidmfinnick commented 4 months ago

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
bartekpacia commented 7 hours ago

hey!

@Ortes, this is an excellent question!

@thaidmfinnick, this is an excellent answer! I think it's good enough and there's no need for modifying code of the action itself.

I'm going to include this in the README so it's more easily accessible to people who might want to do the same.

bartekpacia commented 6 hours ago

Linked to this issue from README in #337.