Skip to content

minimal modifications to 'docker compos' setup and readme #17

minimal modifications to 'docker compos' setup and readme

minimal modifications to 'docker compos' setup and readme #17

Workflow file for this run

name: Build and Push Docker images
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: create .env
run: echo "DB_USERNAME=postgres\nDB_PASSWORD=postgres\nDB_NAME=postgres\nDB_HOST=db" > .env
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
run: |
docker-compose build
docker-compose push
- name: Cleanup
if: always()
run: docker logout