Skip to content

Merge pull request #930 from guardian/dependabot/github_actions/actio… #1145

Merge pull request #930 from guardian/dependabot/github_actions/actio…

Merge pull request #930 from guardian/dependabot/github_actions/actio… #1145

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
env:
isPrFromForkedRepo: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != 'guardian' }}
jobs:
Scala:
runs-on: ubuntu-latest
# Required by aws-actions/configure-aws-credentials
permissions:
id-token: write
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Java
uses: actions/[email protected]
with:
distribution: corretto
java-version: 11
cache: sbt
- name: Test PR from forked repo
if: env.isPrFromForkedRepo == 'true'
run: >
sbt
scalafmtCheckAll
scalafmtSbtCheck
test
assembly
# Required by SBT riffRaffUpload
- name: Assume AWS role
if: env.isPrFromForkedRepo == 'false'
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
aws-region: eu-west-1
- name: Upload artefacts to Riffraff
if: env.isPrFromForkedRepo == 'false'
run: >
sbt
scalafmtCheckAll
scalafmtSbtCheck
riffRaffUpload