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
Some checks failed
build-and-upload-docker / build-and-upload (push) Failing after 16m31s
This commit is contained in:
parent
77a3b16c79
commit
e8b3a96c04
31
.gitea/workflows/build-and-upload-docker.yaml
Normal file
31
.gitea/workflows/build-and-upload-docker.yaml
Normal 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
|
||||||
@ -1,4 +1,4 @@
|
|||||||
FROM debian:12
|
FROM debian:12-slim
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
@ -69,15 +69,15 @@ RUN kbenv install ${KUBECTL_VERSION} \
|
|||||||
&& helmenv install ${HELM_VERSION} \
|
&& helmenv install ${HELM_VERSION} \
|
||||||
&& helmenv use ${HELM_VERSION}
|
&& helmenv use ${HELM_VERSION}
|
||||||
|
|
||||||
ENV TF_VERSION=1.9.5
|
ENV TF_VERSION=1.12.0
|
||||||
RUN tfenv install ${TF_VERSION} \
|
RUN tfenv install ${TF_VERSION} \
|
||||||
&& tfenv use ${TF_VERSION}
|
&& tfenv use ${TF_VERSION}
|
||||||
|
|
||||||
ENV TG_VERSION=0.56.5
|
ENV TG_VERSION=0.83.0
|
||||||
RUN tgenv install ${TG_VERSION} \
|
RUN tgenv install ${TG_VERSION} \
|
||||||
&& tgenv use ${TG_VERSION}
|
&& tgenv use ${TG_VERSION}
|
||||||
|
|
||||||
ENV ANSIBLE_VERSION=10.4.0
|
ENV ANSIBLE_VERSION=11.7.0
|
||||||
RUN pipx install ansible==${ANSIBLE_VERSION}
|
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
|
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
|
||||||
|
|
||||||
|
|||||||
9
build.sh
9
build.sh
@ -1,7 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
|
--progress=plain \
|
||||||
--tag rbvtopudding/devops:latest \
|
--tag rbvtopudding/devops:latest \
|
||||||
--push \
|
--push \
|
||||||
--platform linux/arm64/v8,linux/amd64 \
|
--platform linux/arm64/v8,linux/amd64 \
|
||||||
.
|
.
|
||||||
|
|
||||||
|
|
||||||
|
docker buildx build \
|
||||||
|
--progress=plain \
|
||||||
|
--tag rbvtopudding/devops:1.0.0 \
|
||||||
|
--push \
|
||||||
|
--platform linux/arm64/v8,linux/amd64 \
|
||||||
|
.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user