Skip to content

include table name in uri so we can have different tables in future #89

include table name in uri so we can have different tables in future

include table name in uri so we can have different tables in future #89

Workflow file for this run

name: Build and Deploy
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
# Use a container-based driver (using BuildKit) to enable cache export.
driver-opts: image=moby/buildkit:master
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- name: Preset Image Name
run: |
echo "IMAGE_URL=$(echo ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:$(echo ${{ github.sha }} | cut -c1-7) | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.IMAGE_URL }}
cache-from: type=gha
cache-to: type=gha,mode=max
debug: true
- id: deploy
name: Deploy Image to CapRover
uses: caprover/[email protected]
with:
server: ${{ secrets.CAPTAINROVER_SERVER }}
app: ${{ secrets.CAPTAINROVER_APP_NAME }}
token: ${{ secrets.CAPTAINROVER_APP_TOKEN }}
image: ${{ env.IMAGE_URL }}
- name: Show Deployment Output
run: 'echo "Deployment URL: ${{ steps.deploy.outputs.url }}"'