Submit sbt dependencies to GitHub for vulnerability monitoring #371
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build memsub-promotions | |
on: | |
pull_request: | |
branches: | |
- "**" | |
push: | |
branches: | |
- main | |
jobs: | |
memsub-promotions: | |
if: >- | |
(github.event.pull_request.head.repo.owner.login == 'guardian' || | |
github.event_name == 'push') | |
# Required by actions-assume-aws-role | |
permissions: | |
id-token: write | |
contents: read | |
name: memsub-promotions | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: "./frontend/.nvmrc" | |
- name: Test + build | |
working-directory: ./frontend | |
run: | | |
npm install | |
npm run compile | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} | |
aws-region: eu-west-1 | |
- name: Setup Java 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "corretto" | |
java-version: "11" | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.ivy2/cache | |
~/.sbt | |
~/.coursier | |
key: sbt | |
- name: Install sbt | |
id: sbt | |
uses: sbt/setup-sbt@8a071aa780c993c7a204c785d04d3e8eb64ef272 # v1.1.0 | |
- name: riffraff | |
run: | | |
export LAST_TEAMCITY_BUILD=700 | |
export GITHUB_RUN_NUMBER=$(( $GITHUB_RUN_NUMBER + $LAST_TEAMCITY_BUILD )) | |
sbt clean riffRaffUpload |