Skip to content

Revert hash length (#879) #1202

Revert hash length (#879)

Revert hash length (#879) #1202

on:
push:
branches:
- '*'
- '**/*'
name: Precompile any assets that have changed and push them to S3
concurrency:
group: ${{ github.ref }}-asset-compilation
cancel-in-progress: true
jobs:
compile:
name: Compile
strategy:
matrix:
client_group:
- gha_staging_load_1
- gha_staging_load_2
- gha_staging_load_3
- gha_staging_load_4
- gha_staging_load_5
- gha_staging_load_6
- gha_staging_load_7
- gha_staging_load_8
- gha_production_load_1
- gha_production_load_2
- gha_production_load_3
- gha_production_load_4
# - gha_production_load_5
- gha_production_load_6
runs-on: ubuntu-20.04
container: ruby:3.1.6-alpine3.20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install GNU tar (required by cache step and checksumming)
run: |
apk add --no-cache tar
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Set up dependencies
env:
DATABASE_APP_DB_TEST: boston_hmis_test
WAREHOUSE_DATABASE_DB_TEST: warehouse_test
HEALTH_DATABASE_DB_TEST: health_test
DATABASE_DB_TEST: cas_test
REPORTING_DATABASE_DB_TEST: reporting_test
run: |
apk add --no-cache $(cat .github/dependencies.txt)
echo "postgres:5432:*:postgres:postgres" > ~/.pgpass
chmod 600 ~/.pgpass
# According to https://www.jessesquires.com/blog/2021/08/23/caching-bundler-on-github-actions/
# this is fragile and failure prone, but the step they recommend using instead (ruby/ruby-setup)
# isn't supported on Alpine.
- name: cache gems
uses: actions/cache@v4
id: gemcache
with:
path: |
vendor/bundle
/usr/local/bundle/
key: ${{ runner.os }}-gemcache-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/.ruby-version') }}
# restore-keys: |
# ${{ runner.os }}-gem-bundler-
# - name: Ruby
# uses: ruby/setup-ruby@v1
# with:
# bundler-cache: true
- name: Install gems
if: always()
run: |
gem install bundler --version=2.5.17
bundle config set --local without 'production staging development'
bundle install --jobs 10 --retry 3
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
- name: Install Node.js modules
run: yarn install --frozen-lockfile
- name: Generate checksum and compile
env:
SECRETS_YML_SECRET_ARN: ${{ secrets.SECRETS_YML_SECRET_ARN }}
DATABASE_ADAPTER: postgresql
DATABASE_HOST: postgres
DATABASE_PASS: postgres
DATABASE_USER: postgres
DEFAULT_FROM: greenriver.testing@mailinator.com
ENCRYPTION_KEY: strongEncryptionstrongEncryptionstrongEncryption
DATABASE_DB_TEST: boston_cas_test
HOSTNAME: openpath.host
PORT: 80
run: |
DEPLOY_PROTECT_SECRETS=true EXCEPTION_WEBHOOK_CHANNEL_OVERRIDE=gr-op-gha-except bundle exec bin/compile_assets.rb ${{ matrix.client_group }}