diff --git a/.github/workflows/buildImageWithTestTag.yaml b/.github/workflows/buildImageWithTestTag.yaml new file mode 100644 index 000000000..edd7deb15 --- /dev/null +++ b/.github/workflows/buildImageWithTestTag.yaml @@ -0,0 +1,47 @@ +name: CD + +on: + merge_group: + types: + - checks_requested + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build Query Connector Image + runs-on: ubuntu-latest + permissions: + contents: "read" + id-token: "write" + packages: "write" + steps: + - name: Check Out Changes + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: lowercase repo name to use in following step + env: + REPO: ${{ github.repository }} + run: | + echo "REPO=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: ./query-connector + push: true + tags: | + ghcr.io/${{ env.REPO }}/query-connector:test