-
Notifications
You must be signed in to change notification settings - Fork 112
49 lines (42 loc) · 1.48 KB
/
build-artifact.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: 'Build cf.gov artifact'
on:
pull_request:
merge_group:
workflow_dispatch:
jobs:
Build:
if: github.repository == 'cfpb/consumerfinance.gov'
runs-on: ubuntu-latest
env:
ARTIFACT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: yarn
- name: Build frontend
run: yarn run build
- name: Run the build process with Docker
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
image: ghcr.io/${{ github.repository }}-builder:main
options: -v ${{ github.workspace }}:/cfgov
run: |
source scl_source enable rh-python38
./call_create.sh
- name: Upload arifact
uses: keithweaver/aws-s3-github-action@v1.0.0
with:
command: cp
source: cfgov_current_build.zip
destination: s3://${{ secrets.BUCKET }}/cfgov_${{ env.ARTIFACT_SHA }}_build.zip
aws_access_key_id: ${{ secrets.BUILD_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.BUILD_SECRET_ACCESS_KEY }}
aws_region: us-east-1