Add dry-run (#270)

* Add dry-run

* Add dry-run test

* format

---------

Co-authored-by: Bartek Pacia <barpac02@gmail.com>
This commit is contained in:
kzrnm
2024-04-02 21:25:52 +09:00
committed by GitHub
parent 980391a6c5
commit 44ac965b96
3 changed files with 39 additions and 0 deletions

View File

@@ -282,6 +282,30 @@ steps:
echo PUB-CACHE-KEY=${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
```
If you don't need to install Flutter and just want the outputs, you can use the
`dry-run` option:
```yaml
steps:
- name: Clone repository
- uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
id: flutter-action
with:
channel: stable
dry-run: true
- run: |
echo CACHE-PATH=${{ steps.flutter-action.outputs.CACHE-PATH }}
echo CACHE-KEY=${{ steps.flutter-action.outputs.CACHE-KEY }}
echo CHANNEL=${{ steps.flutter-action.outputs.CHANNEL }}
echo VERSION=${{ steps.flutter-action.outputs.VERSION }}
echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
echo PUB-CACHE-PATH=${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
echo PUB-CACHE-KEY=${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
shell: bash
```
## Maintainers
- [Alif Rachmawadi] (original creator)