Skip to content

Commit

Permalink
Upgrade actions/cache from v3 to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
hrishikesh-kadam committed Apr 3, 2024
1 parent 26114f4 commit 40a3ad4
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 22 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "12:00"
timezone: "Asia/Kolkata"
4 changes: 2 additions & 2 deletions .github/workflows/ci-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
runner: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./
with:
Expand All @@ -27,7 +27,7 @@ jobs:
matrix:
runner: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
matrix:
runner: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./
- run: flutter --version
Expand All @@ -43,7 +43,7 @@ jobs:
matrix:
runner: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./
with:
Expand All @@ -57,7 +57,7 @@ jobs:
matrix:
runner: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./
with:
Expand All @@ -75,7 +75,7 @@ jobs:
- runner: ubuntu-latest
actionsCache: 'false'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./
with:
Expand All @@ -93,7 +93,7 @@ jobs:
- runner: windows-latest
pubCachePath: '$LOCALAPPDATA\FooPub\Cache'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: ./
with:
Expand All @@ -119,10 +119,10 @@ jobs:
flutter pub get
ls $PUB_CACHE/hosted/pub.dev
# addPubCacheBinToPath
- run: dart pub global activate markdown
- run: dart pub global activate dhttpd
- if: runner.os != 'Windows'
run: markdown --help
run: dhttpd --help
- if: runner.os == 'Windows'
shell: pwsh
run: markdown --help
run: dhttpd --help
- run: ls $PUB_CACHE/global_packages
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.4.0] - 2024-04-03
### Changed
- Upgraded `actions/cache` from v3 to v4

## [1.3.1] - 2023-03-28
### Fixed
- Input `actionsCacheKey`
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Below are the stats of before and after caching based on the following condition

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
- run: # Run your flutter or dart command here
Expand All @@ -98,7 +98,7 @@ steps:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
with:
Expand All @@ -124,7 +124,7 @@ steps:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
with:
Expand All @@ -150,7 +150,7 @@ steps:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
with:
Expand Down Expand Up @@ -179,7 +179,7 @@ steps:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
with:
Expand All @@ -206,7 +206,7 @@ steps:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
with:
Expand Down Expand Up @@ -241,7 +241,7 @@ my-job:
- runner: windows-latest
pubCachePath: '$LOCALAPPDATA\Pub\Cache'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
with:
Expand Down Expand Up @@ -269,14 +269,14 @@ my-job:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
with:
addPubCacheBinToPath: 'true'
- run: |
dart pub global activate markdown
markdown --help
dart pub global activate dhttpd
dhttpd --help
```

## `flutterPrecache`
Expand All @@ -300,7 +300,7 @@ steps:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Flutter
uses: hrishikesh-kadam/setup-flutter@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:
- name: Check if Flutter is cached
if: inputs.actionsCache == 'true'
id: cache-flutter
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.SETUP_FLUTTER_INSTALLATION_PATH }}
key: ${{ env.SETUP_FLUTTER_ACTIONS_CACHE_KEY }}
Expand Down

0 comments on commit 40a3ad4

Please sign in to comment.