Skip to content

Commit

Permalink
Merge pull request #883 from nextcloud/maintenance/cleanup-actions
Browse files Browse the repository at this point in the history
Use NPM folders from internal cache
  • Loading branch information
christianlupus authored Jan 17, 2022
2 parents 721af3a + 36af3dd commit 10b7f48
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 7 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/deploy-appstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,21 @@ jobs:
path: cookbook
ref: ${{ github.ref }}
fetch-depth: 0


- name: Get the date
id: date
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
- name: Use cache for NPM
uses: actions/cache@v2.1.7
with:
path: |
~/.npm
cookbook/node_modules
key: ${{ runner.os }}-node-${{ steps.date.outputs.date }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.date.outputs.date }}-
${{ runner.os }}-node-
- name: Bump the version
id: bump
run: ./.github/actions/deploy/create-version.sh
Expand Down
33 changes: 27 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,20 @@ jobs:
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Make sure the appinfo is built
shell: bash
run: make appinfo/info.xml

- name: Get the date
id: date
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
- name: Cache NPM cache
uses: actions/cache@v2.1.7
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ steps.date.outputs.date }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.date.outputs.date }}-
${{ runner.os }}-node-
- name: Get PHP version
shell: bash
run: php -v
Expand Down Expand Up @@ -295,9 +306,19 @@ jobs:
- name: Checkout the app
uses: actions/checkout@v2

- name: Ensure the appinfo is built
shell: bash
run: make appinfo/info.xml
- name: Get the date
id: date
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
- name: Use cache for NPM
uses: actions/cache@v2.1.7
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ steps.date.outputs.date }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.date.outputs.date }}-
${{ runner.os }}-node-
- name: Update NPM
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
[#879](https://github.com/nextcloud/cookbook/pull/879) @christianlupus
- Allow for multiline text in instructions
[#880](https://github.com/nextcloud/cookbook/pull/880) @christianlupus
- Usage of caches for NPM speedup
[#883](https://github.com/nextcloud/cookbook/pull/883) @christianlupus


## 0.9.9 - 2022-01-13
Expand Down

0 comments on commit 10b7f48

Please sign in to comment.