Skip to content

remove schema from database connection function #201

remove schema from database connection function

remove schema from database connection function #201

Workflow file for this run

name: Build and Publish
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
prepare_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
with:
path: './'
persist-credentials: false
- id: set-matrix
run: |
JSON=$(cat ./src/packagesToBuild.json)
echo "::set-output name=matrix::${JSON}"
build-and-deploy:
needs: prepare_matrix
strategy:
matrix:
workers: ${{fromJson(needs.prepare_matrix.outputs.matrix)}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: './'
- id: set-timestamp
run: |
echo "::set-output name=timestamp::$(git log -1 --format="%aI" -- ./src/${{ matrix.workers }}|sed 's;-;;g'|sed 's;:;;g'|awk -F + '{print $1}'|cut -c -13)"
- name: Set up Docker Buildx 🔧
uses: docker/setup-buildx-action@v1
- name: Login to ghcr.io 🔧
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push ${{ matrix.workers_names }} 🚀
uses: docker/build-push-action@v2
with:
file: ./src/${{ matrix.workers }}/Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/mqm-worker/${{ matrix.workers }}:latest
ghcr.io/${{ github.repository_owner }}/mqm-worker/${{ matrix.workers }}:${{ steps.set-timestamp.outputs.timestamp }}