Skip to content

Commit

Permalink
Fix "Setup Credentials" in postgres.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronskiba committed Jul 4, 2024
1 parent 9da8368 commit 5b0db0a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,21 @@ jobs:
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
cp .env.postgresql .env
- name: 'Generate and Set RAILS_MASTER_KEY'
run: |
export RAILS_MASTER_KEY=$(bundle exec rails secret)
echo $RAILS_MASTER_KEY > config/master.key
echo "RAILS_MASTER_KEY length: ${#RAILS_MASTER_KEY}"
# Stub out the Rails credentials file so that we can start the Rails app
- name: 'Setup Credentials'
env:
EDITOR: "cat"
run: |
# generate a default credential file and key
EDITOR='echo "$(cat config/credentials.yml.postgresql)" >' bundle exec rails credentials:edit
echo "RAILS_MASTER_KEY length: ${#RAILS_MASTER_KEY}"
cp config/credentials.yml.postgresql config/credentials.yml
bundle exec rails credentials:edit
# Set the path to the wkhtmltopdf executable
- name: 'Determine wkhtmltopdf location'
Expand Down

0 comments on commit 5b0db0a

Please sign in to comment.