diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..e9b128c --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,48 @@ +name: Build and Push container +run-name: Build and Push container +on: + workflow_dispatch: + create: + push: +env: + VCS_REF: ${{ github.sha }} + VERSION: 0.0.1 + IMAGE: git.kvant.cloud/phoenix/docker_tpl +jobs: + build_concierge_backend: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set current time + uses: gerred/actions/current-time@master + id: current_time + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to gitea registry + uses: docker/login-action@v3 + with: + registry: git.kvant.cloud + username: ${{ vars.PHOENIX_PACKAGE_WRITER_USERNAME }} + password: ${{ secrets.PHOENIX_PACKAGE_WRITER_TOKEN }} + + - name: Build and push to gitea registry + uses: docker/build-push-action@v6 + with: + push: true + context: ./kvant_AI_chatbot + build-args: | + BUILD_DATE=${{ steps.current_time.outputs.time }} + image: ${{ env.IMAGE }} + cache-from: | + type=registry,ref=${{ env.IMAGE }}:${{ github.ref_name }} + type=registry,ref=${{ env.IMAGE }}:latest + cache-to: type=inline + tags: | + ${{ env.IMAGE }}:${{ github.ref_name }} + ${{ env.IMAGE }}:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..67fd379 --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ +FROM alpine