Skip to content

Issues noticed while dockerizing the bq connection to flapi #26

Issues noticed while dockerizing the bq connection to flapi

Issues noticed while dockerizing the bq connection to flapi #26

Workflow file for this run

name: Build flAPI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout submodule
uses: actions/checkout@v3
with:
repository: duckdb/duckdb
path: duckdb
ref: v1.1.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build
- name: Cache vcpkg
uses: actions/cache@v3
with:
path: |
~/.cache/vcpkg
./vcpkg/installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }}
- name: Configure vcpkg
run: |
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg integrate install
- name: Build Release
run: make release
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: flAPI-build
path: ${{github.workspace}}/build/Release/flapi
if-no-files-found: error
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lowercase github.repository_owner
run: |
echo "REPOSITORY_OWNER=`echo ${{github.repository_owner}} | tr '[:upper:]' '[:lower:]'`" >>${GITHUB_ENV}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/development/Dockerfile
push: true
tags: |
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && format('ghcr.io/{0}/flapi:latest', env.REPOSITORY_OWNER) || '' }}
${{ github.event_name == 'push' && format('ghcr.io/{0}/flapi:branch-{1}', env.REPOSITORY_OWNER, github.ref_name) || '' }}
${{ github.event_name == 'pull_request' && format('ghcr.io/{0}/flapi:pr-{1}', env.REPOSITORY_OWNER, github.event.number) || '' }}
ghcr.io/${{ env.REPOSITORY_OWNER }}/flapi:${{ github.sha }}