From fa2f732182c8ac103c3fdcb0cfe5eecba2474382 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 26 Jun 2024 16:58:04 +0200 Subject: [PATCH] feat: add wmill cli image --- .github/workflows/build_cli_image.yml | 55 +++++++++++++++++++++ .github/workflows/docker-310.yml.archived | 50 ------------------- .github/workflows/docker-mssql.yml.archived | 46 ----------------- docker/DockerfileCli | 5 ++ 4 files changed, 60 insertions(+), 96 deletions(-) create mode 100644 .github/workflows/build_cli_image.yml delete mode 100644 .github/workflows/docker-310.yml.archived delete mode 100644 .github/workflows/docker-mssql.yml.archived diff --git a/.github/workflows/build_cli_image.yml b/.github/workflows/build_cli_image.yml new file mode 100644 index 0000000000..7f66d68f9e --- /dev/null +++ b/.github/workflows/build_cli_image.yml @@ -0,0 +1,55 @@ +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }}-cli + +name: Publish cli image +on: + push: + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: read + id-token: write + packages: write + +jobs: + publish_cli: + runs-on: ubicloud + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: depot/setup-action@v1 + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Login to registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push publicly + uses: depot/build-push-action@v1 + with: + file: "./docker/DockerfileCli" + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + ${{ steps.meta.outputs.tags }} + labels: | + ${{ steps.meta.outputs.labels }} + org.opencontainers.image.licenses=AGPLv3 diff --git a/.github/workflows/docker-310.yml.archived b/.github/workflows/docker-310.yml.archived deleted file mode 100644 index de98896927..0000000000 --- a/.github/workflows/docker-310.yml.archived +++ /dev/null @@ -1,50 +0,0 @@ -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -name: Build windmill:python310 -on: workflow_dispatch - -concurrency: - group: ${{ github.ref }}-python3.10 - cancel-in-progress: true - -permissions: - contents: read - id-token: write - packages: write - -jobs: - build_ee: - runs-on: ubicloud - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v2 - - - uses: depot/setup-action@v1 - - - name: Login to registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Edit python version - run: | - sed -i 's/python:3.11.4/python:3.10.12/g' Dockerfile - - - name: Build and push publicly ee - uses: depot/build-push-action@v1 - with: - context: . - push: true - build-args: | - features=enterprise - tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:python310 - labels: | - org.opencontainers.image.licenses=Windmill-Enterprise-License diff --git a/.github/workflows/docker-mssql.yml.archived b/.github/workflows/docker-mssql.yml.archived deleted file mode 100644 index 4ddff5cc82..0000000000 --- a/.github/workflows/docker-mssql.yml.archived +++ /dev/null @@ -1,46 +0,0 @@ -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -name: Build windmill:mssql -on: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-mssql - cancel-in-progress: true - -permissions: - contents: read - id-token: write - packages: write - -jobs: - build_ee: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - uses: depot/setup-action@v1 - - - name: Login to registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push publicly ee - uses: depot/build-push-action@v1 - with: - context: . - push: true - file: ./docker/DockerfileMssql - build-args: | - features=enterprise - tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:mssql - labels: | - org.opencontainers.image.licenses=Windmill-Enterprise-License diff --git a/docker/DockerfileCli b/docker/DockerfileCli index e69de29bb2..3572f82922 100644 --- a/docker/DockerfileCli +++ b/docker/DockerfileCli @@ -0,0 +1,5 @@ +FROM denoland/deno:1.44.4 + +RUN deno install -q -A https://raw.githubusercontent.com/windmill-labs/windmill/main/cli/main.ts --name wmill + +ENTRYPOINT [ "wmill" ] \ No newline at end of file