devops: add gitea workflow for building and uploading docker images, update dockerfile and build script for compatibility.
Some checks failed
build-and-upload-docker / build-and-upload (push) Failing after 16m31s

This commit is contained in:
Rebecca Valente 2025-07-11 00:19:37 -03:00
parent 77a3b16c79
commit e8b3a96c04
3 changed files with 44 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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 \
.