From e8b3a96c04388a0b57d13a464253c41b6137b4d2 Mon Sep 17 00:00:00 2001 From: Rebecca Valente Date: Fri, 11 Jul 2025 00:19:37 -0300 Subject: [PATCH] devops: add gitea workflow for building and uploading docker images, update dockerfile and build script for compatibility. --- .gitea/workflows/build-and-upload-docker.yaml | 31 +++++++++++++++++++ Dockerfile | 8 ++--- build.sh | 9 ++++++ 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 .gitea/workflows/build-and-upload-docker.yaml diff --git a/.gitea/workflows/build-and-upload-docker.yaml b/.gitea/workflows/build-and-upload-docker.yaml new file mode 100644 index 0000000..e7f9d22 --- /dev/null +++ b/.gitea/workflows/build-and-upload-docker.yaml @@ -0,0 +1,31 @@ +name: build-and-upload-docker + +on: + push: + branches: + - trunk + paths: + - 'Dockerfile' + - 'rootfs/**' + - 'build.sh' + +jobs: + build-and-upload: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Build and push + run: | + chmod +x ./build.sh + ./build.sh diff --git a/Dockerfile b/Dockerfile index 08fcf18..9c0fd71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:12 +FROM debian:12-slim ENV DEBIAN_FRONTEND=noninteractive USER root @@ -69,15 +69,15 @@ RUN kbenv install ${KUBECTL_VERSION} \ && helmenv install ${HELM_VERSION} \ && helmenv use ${HELM_VERSION} -ENV TF_VERSION=1.9.5 +ENV TF_VERSION=1.12.0 RUN tfenv install ${TF_VERSION} \ && tfenv use ${TF_VERSION} -ENV TG_VERSION=0.56.5 +ENV TG_VERSION=0.83.0 RUN tgenv install ${TG_VERSION} \ && tgenv use ${TG_VERSION} -ENV ANSIBLE_VERSION=10.4.0 +ENV ANSIBLE_VERSION=11.7.0 RUN pipx install ansible==${ANSIBLE_VERSION} ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/app/n/bin:/root/.local/bin:/root/.local/pipx/venvs/ansible/bin diff --git a/build.sh b/build.sh index ec94a75..e28614e 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,16 @@ #!/usr/bin/env bash docker buildx build \ + --progress=plain \ --tag rbvtopudding/devops:latest \ --push \ --platform linux/arm64/v8,linux/amd64 \ . + + +docker buildx build \ + --progress=plain \ + --tag rbvtopudding/devops:1.0.0 \ + --push \ + --platform linux/arm64/v8,linux/amd64 \ + .