Skip to content

Update README.md

Update README.md #23

name: Build and Push Docker images
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Build and push Node app image
run: |
REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
docker build -t ghcr.io/$REPO_OWNER/node-repo:latest .
docker push ghcr.io/$REPO_OWNER/node-repo:latest
- name: Build and push Flask app image
run: |
REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
docker build -t ghcr.io/$REPO_OWNER/flask-repo:latest ./flask_api
docker push ghcr.io/$REPO_OWNER/flask-repo:latest