Skip to content

Merge pull request #490 from guardian/update-training-doc-links #283

Merge pull request #490 from guardian/update-training-doc-links

Merge pull request #490 from guardian/update-training-doc-links #283

Workflow file for this run

name: build
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
permissions:
# Allow GitHub to request an OIDC JWT ID token, for exchange with AWS Security Token Service (STS)
# See https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#updating-your-github-actions-workflow
id-token: write
contents: read
pull-requests: write
steps:
# Seed the build number with last number from TeamCity.
# This env var is used by the JS, and SBT builds, and guardian/actions-riff-raff.
# Set the value early, rather than `buildNumberOffset` in guardian/actions-riff-raff, to ensure each usage has the same number.
# For some reason, it's not possible to mutate GITHUB_RUN_NUMBER, so set BUILD_NUMBER instead.
- name: Set BUILD_NUMBER environment variable
run: |
LAST_TEAMCITY_BUILD=1603
echo "BUILD_NUMBER=$(( $GITHUB_RUN_NUMBER + $LAST_TEAMCITY_BUILD ))" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: "11"
cache: "sbt"
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install JS dependencies
run: yarn install --frozen-lockfile
- name: test JS
run: yarn test
- name: JS build
run: yarn build
- name: Build, test and package the scala app
run: |
sbt clean compile test Debian/packageBin
- uses: guardian/actions-riff-raff@v4
with:
projectName: Editorial Tools::Workflow::Workflow Frontend
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
buildNumber: ${{ env.BUILD_NUMBER }}
configPath: conf/riff-raff.yaml
contentDirectories: |
workflow-frontend:
- target/workflow-frontend_0.1_all.deb