diff --git a/.env b/.env new file mode 100644 index 0000000..361d57e --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +RESTIC_VERSION=0.16.2-r0 +KUBECTL_VERSION=1.28.4-r0 \ No newline at end of file diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 0768a29..9ad171d 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -24,8 +24,12 @@ jobs: password: ${{ secrets.REGISTRY_TOKEN }} - name: Build and push run: | - VERSION=$(cat VERSION) - docker build --build-arg="RESTIC_VERSION=${VERSION}" -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${VERSION} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest . - docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${VERSION} + source .env + docker build \ + --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 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f1e7588..ae6cbdb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,6 @@ FROM alpine:3 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"] CMD ["--help"] \ No newline at end of file diff --git a/README.md b/README.md index 29f792d..41bd83e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # restic -Restic container for backing up k3s volumes \ No newline at end of file +Restic container with kubectl for backing up k3s volumes \ No newline at end of file diff --git a/VERSION b/VERSION deleted file mode 100644 index bf7788d..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.16.2-r0 \ No newline at end of file