Skip to content

Instantly share code, notes, and snippets.

@danielabar
Created July 11, 2021 19:49
Show Gist options
  • Save danielabar/04dbbe67f0c1cae595f6e44350fa5005 to your computer and use it in GitHub Desktop.
Save danielabar/04dbbe67f0c1cae595f6e44350fa5005 to your computer and use it in GitHub Desktop.
Debug Github Actions Medium Post Gist 13
# .github/workflows/ci.yml
services:
db:
image: postgres:13
env:
POSTGRES_PASSWORD: its_a_secret
POSTGRES_USER: postgres
ports:
- 5432:5432
# volume for bind mount removed!
# assign the container a predictable name
options: --name myapp_db
redis:
# same as before...
steps:
- name: Checkout source
uses: actions/checkout@v1
- name: Create role
run: docker exec myapp_db bash -c "PGPASSWORD=shhhhh psql -U postgres -c \"create role myapp with createdb login password 'myapp'\""
# remainder of the steps...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment