-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate giant to github actions #153
Changes from 8 commits
ded7a1e
d59fa0e
ae375d0
2d4c976
903dcce
103a8ee
374f380
c8fb361
093f3b9
cacfb12
9396cca
02fb362
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Find full documentation here https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | ||
name: CI | ||
|
||
on: | ||
# Manual invocation. | ||
workflow_dispatch: | ||
|
||
push: | ||
|
||
jobs: | ||
CI: | ||
runs-on: ubuntu-latest | ||
|
||
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token | ||
permissions: | ||
# required by aws-actions/configure-aws-credentials | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Setup AWS credentials to enable uploading to S3 for Riff-Raff. | ||
# See https://github.com/aws-actions/configure-aws-credentials | ||
- uses: aws-actions/configure-aws-credentials@v4 | ||
name: setup-riffraff-credentials | ||
with: | ||
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} | ||
aws-region: eu-west-1 | ||
|
||
# Setup Node, checking common Node config files to determine the version of Node to use. | ||
# Configuring caching is also recommended. | ||
# See https://github.com/guardian/actions-setup-node | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
# Configuring caching is also recommended. | ||
# See https://github.com/actions/setup-java | ||
- name: Setup Java 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
# 1. Seed the build number with last number from TeamCity. | ||
# Update `LAST_TEAMCITY_BUILD` as needed or remove entirely if changing Riff-Raff project name. | ||
# See https://github.com/github/scripts-to-rule-them-all | ||
- name: Run script/teamcity | ||
run: | | ||
LAST_TEAMCITY_BUILD=5000 | ||
export GITHUB_RUN_NUMBER=$(( $GITHUB_RUN_NUMBER + $LAST_TEAMCITY_BUILD )) | ||
./scripts/teamcity.sh |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be renamed to |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -21,7 +21,10 @@ popd | |||||||||||||||||
cp -r frontend/build/* backend/public | ||||||||||||||||||
# Replace the symbolic link we use in dev with the actual file. | ||||||||||||||||||
# On Teamcity the JDeb build doesn't seem to follow the symbolic link while packaging, weirdly | ||||||||||||||||||
cp frontend/node_modules/pdfjs-dist/build/pdf.worker.min.js backend/public/third-party/pdf.worker.min.js | ||||||||||||||||||
# NOTE: On Github actions this seems to work, and in fact it will complain if you try and run the below line | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't comment on parts of this file that weren't modified in this PR, but lines 4-11 in this script are made redundant by Lines 4 to 11 in 958316e
|
||||||||||||||||||
# because it thinks that the two files are the same. So could be removed at some point but let's leave it for | ||||||||||||||||||
# a bit in case e.g. github actions custom runners have similar issues | ||||||||||||||||||
#cp frontend/node_modules/pdfjs-dist/build/pdf.worker.min.js backend/public/third-party/pdf.worker.min.js | ||||||||||||||||||
|
||||||||||||||||||
#Use java 11 | ||||||||||||||||||
export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto | ||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.