Skip to content

Commit

Permalink
build: Improve GitHub Actions caching and reproducibility (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubjanecek authored Jan 13, 2021
1 parent ad84c9d commit b2bf908
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: coursier/cache-action@v5
- name: Check/Compile/Test
run: sbt check
update_release_draft:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: release-drafter/release-drafter@v5
env:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: coursier/cache-action@v5
with:
extraKey: pr-${GITHUB_HEAD_REF}
- name: Check/Compile/Test
run: sbt check
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install GPG
uses: olafurpg/setup-gpg@v3
- uses: coursier/cache-action@v5
- name: Check/Compile/Test
run: sbt check
- name: Release
Expand All @@ -23,11 +22,19 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: sbt ci-release
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems
restore-keys: |
${{ runner.os }}-gems
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Install jekyll
run: gem install jekyll -v 4.0.0
run: |
export GEM_HOME=${PWD}/vendor/bundle
gem install jekyll -v 4.0.0
- name: Publish Microsite
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
Expand Down

0 comments on commit b2bf908

Please sign in to comment.