diff --git a/.github/workflows/dev_dispatch.yml b/.github/workflows/dev_dispatch.yml index 94d3014..93f408e 100644 --- a/.github/workflows/dev_dispatch.yml +++ b/.github/workflows/dev_dispatch.yml @@ -57,7 +57,6 @@ on: required: false default: "60" - jobs: deploy-docker-k8s: runs-on: ubuntu-latest @@ -109,7 +108,7 @@ jobs: - name: Validate Kubernetes for Deployment # Of course, this would not be a dry run if I had a real cluster to deploy to. uses: docker://ghcr.io/yannh/kubeconform:latest with: - args: "-strict -ignore-missing-schemas ops/*.yaml" + args: "-strict -ignore-missing-schemas ops/deploy.yaml ops/service.yaml ops/hpa.yaml" - name: Upload rendered manifests as build artifacts uses: actions/upload-artifact@v4 @@ -119,3 +118,26 @@ jobs: ops/deploy.yaml ops/service.yaml ops/hpa.yaml + + - name: Set up Docker Buildx + if: github.event.inputs.push_to_dockerhub == 'true' + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + if: github.event.inputs.push_to_dockerhub == 'true' + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push image + if: github.event.inputs.push_to_dockerhub == 'true' + uses: docker/build-push-action@v6 + with: + context: . + push: true + build-args: | + BASE_IMAGE=${{ github.event.inputs.base_image }} + tags: | + sadminriley/${{ github.event.inputs.name }}:latest + sadminriley/${{ github.event.inputs.name }}:${{ github.run_number }} diff --git a/Dockerfile b/Dockerfile index 2fdab09..a38c57e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # Still in LTS as of june '24. python2 support isn't a thing in 26.04(ubuntu:latest) either -FROM ubuntu:22.04 +ARG BASE_IMAGE=ubuntu:22.04 +FROM ${BASE_IMAGE} ENV DEBIAN_FRONTEND=noninteractive \