Skip to content

Commit

Permalink
composite actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mproch committed Jan 5, 2021
1 parent 711259a commit dd58b66
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
29 changes: 29 additions & 0 deletions .github/actions/setup/action.yml
@@ -0,0 +1,29 @@
name: 'setup'
description: 'setup'
#TODO: cache only when needed
inputs:

outputs:

runs:
using: "composite"
steps:
- name: Cache ivy packages
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-ivy2-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-sbt
- uses: olafurpg/setup-scala@v10
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 14.11.0
- name: Cache npm
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
10 changes: 1 addition & 9 deletions .github/workflows/pr.yml
Expand Up @@ -11,15 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache ivy packages
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-ivy2-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-sbt
- uses: olafurpg/setup-scala@v10
- uses: ./.github/actions/setup
- name: Build
shell: bash
run: ./ciRunSbt.sh clean compile
Expand Down

0 comments on commit dd58b66

Please sign in to comment.