diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7385d7a2ac..f4d2c41417 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -170,3 +170,35 @@ jobs: labels: ${{ steps.meta-heavy.outputs.labels }} cache-from: type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache cache-to: type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max + + publish_internal: + runs-on: [self-hosted, new] + needs: [build] + if: github.event_name != 'pull_request' + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + + - name: Login to ECR + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ${{ env.ECR_REGISTRY }} + username: ${{ secrets.AWS_ACCESS_KEY_ID }} + password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Build and push privately + uses: docker/build-push-action@v3 + if: github.event_name != 'pull_request' + with: + context: . + push: true + file: ./docker/Dockerfilehelm + tags: | + {{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:helm + cache-from: type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache + cache-to: type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max diff --git a/docker/DockerfileHelm b/docker/DockerfileHelm new file mode 100644 index 0000000000..5f7e898d05 --- /dev/null +++ b/docker/DockerfileHelm @@ -0,0 +1,15 @@ +FROM ghcr.io/windmill-labs/windmill:main + +RUN wget https://get.helm.sh/helm-v3.10.1-linux-amd64.tar.gz && \ + tar -zxvf helm-v3.10.1-linux-amd64.tar.gz && \ + mv linux-amd64/helm /usr/local/bin/helm &&\ + chmod +x /usr/local/bin/helm + +RUN curl -LO "https://dl.k8s.io/release/v1.23.6/bin/linux/amd64/kubectl" && \ + install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl + +RUN apt-get update && apt install unzip && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install + +CMD ["./windmill"]