Skip to content

Commit

Permalink
ci: Use guardian/setup-scala GitHub Action
Browse files Browse the repository at this point in the history
This action will provide Java and SBT to the runner.
This is a mitigation against the incoming changes from GitHub where the `ubuntu-latest` runner will stop providing `sbt` by default.

See:
- https://github.com/guardian/setup-scala
- https://github.blog/changelog/2024-11-05-notice-of-breaking-changes-for-github-actions/
- https://github.com/actions/runner-images#10636
  • Loading branch information
akash1810 committed Dec 16, 2024
1 parent 3ae2c6b commit c5948c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ jobs:
cache: 'npm'
cache-dependency-path: 'cdk/package-lock.json'

# Java is needed for the Scala Play app
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '11' # TODO read this from the `.java-version` file in the repository
distribution: 'corretto'
- uses: guardian/setup-scala@v1

- run: ./scripts/ci

- uses: guardian/actions-riff-raff@v4
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/sbt-dependency-graph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,7 @@ jobs:
- name: Checkout branch
id: checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Install Java
id: java
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.2.0
with:
distribution: corretto
java-version: 17
- name: Install sbt
id: sbt
uses: sbt/setup-sbt@50a38cca700907fb9df65ecabcefb85ebaa424a7 # v1.1.4
- uses: guardian/setup-scala@v1
- name: Submit dependencies
id: submit
uses: scalacenter/sbt-dependency-submission@64084844d2b0a9b6c3765f33acde2fbe3f5ae7d3 # v3.1.0
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java corretto-11.0.25.9.1

0 comments on commit c5948c7

Please sign in to comment.