Add kubectl
Build restic container / Build image (push) Failing after 9s Details

This commit is contained in:
LordMathis 2024-01-30 13:21:19 +01:00
parent 58ae7a3c72
commit 42d8031cf1
5 changed files with 11 additions and 6 deletions

2
.env Normal file
View File

@ -0,0 +1,2 @@
RESTIC_VERSION=0.16.2-r0
KUBECTL_VERSION=1.28.4-r0

View File

@ -24,8 +24,12 @@ jobs:
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push - name: Build and push
run: | run: |
VERSION=$(cat VERSION) source .env
docker build --build-arg="RESTIC_VERSION=${VERSION}" -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${VERSION} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest . docker build \
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${VERSION} --build-arg="RESTIC_VERSION=${RESTIC_VERSION}" \
--build-arg="KUBECTL_VERSION=${KUBECTL_VERSION}" \
-t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${RESTIC_VERSION} \
-t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${RESTIC_VERSION}
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest

View File

@ -2,6 +2,6 @@ FROM alpine:3
ARG RESTIC_VERSION ARG RESTIC_VERSION
RUN apk add restic=${RESTIC_VERSION} --no-cache RUN apk add restic=${RESTIC_VERSION} kubectl=${KUBECTL_VERSION} --no-cache
ENTRYPOINT ["/usr/bin/restic"] ENTRYPOINT ["/usr/bin/restic"]
CMD ["--help"] CMD ["--help"]

View File

@ -1,3 +1,3 @@
# restic # restic
Restic container for backing up k3s volumes Restic container with kubectl for backing up k3s volumes

View File

@ -1 +0,0 @@
0.16.2-r0