Skip to content

Merge pull request #478 from guardian/fp/properly-disable-create-button #238

Merge pull request #478 from guardian/fp/properly-disable-create-button

Merge pull request #478 from guardian/fp/properly-disable-create-button #238

Workflow file for this run

name: build
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
permissions: # required by aws-actions/configure-aws-credentials
id-token: write
contents: read
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: AWS Auth
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
aws-region: eu-west-1
- 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@v2
with:
projectName: Editorial Tools::Workflow::Workflow Frontend
buildNumber: ${{ env.BUILD_NUMBER }}
configPath: conf/riff-raff.yaml
contentDirectories: |
workflow-frontend:
- target/workflow-frontend_0.1_all.deb