Skip to content

Create LICENSE

Create LICENSE #12

Workflow file for this run

name: Build & Push Backend Docker Image to GHCR
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image name
run: |
REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
echo "IMAGE=ghcr.io/${REPO_OWNER}/${REPO_NAME}-backend:latest" >> $GITHUB_ENV
- name: Build Docker image from ./backend
run: |
cd backend
docker build -t $IMAGE .
- name: Push Docker image
run: docker push $IMAGE