Skip to content

Add sqlite in Docker image #22

Add sqlite in Docker image

Add sqlite in Docker image #22

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Build the Docker image
run: |
docker build . --file Dockerfile --tag ghcr.io/openplaceguide/opg-pages:latest
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$CURRENT_BRANCH" = "main" ]; then
echo "On the 'main' branch. Pushing the Docker image..."
docker push ghcr.io/openplaceguide/opg-pages:latest
else
echo "Not on the 'main' branch. Skipping Docker push."
fi