diff --git a/.releaserc.json b/.releaserc.json index a5a023d..8d94803 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -37,6 +37,12 @@ "prepareCmd": "sed -i 's/^version.*$/version = \"${nextRelease.version}\"/' pyproject.toml ; cat pyproject.toml" } ], + [ + "@semantic-release/exec", + { + "prepareCmd": "sed -i 's/backup-github-org.*$/backup-github-org==${nextRelease.version}/' Dockerfile ; cat Dockerfile" + } + ], [ "@semantic-release/git", { diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1640d2b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.10 +WORKDIR /backup + +ARG VERSION +ENV DEBIAN_FRONTEND=noninteractive +RUN mkdir /backup/backup && mkdir /backup/metrics \ + && pip install backup-github-org==${VERSION} + +CMD ["backup-github", "--help"] + +# Build: docker build . -t backup --build-arg VERSION=1.0.4 +# Run: docker run --rm -v .\backup:/backup/backup -v .\metrics:/backup/metrics backup backup-github --all -t "token" -o "/backup/backup" --metrics_path "/backup/metrics/backup.prom" "organization" \ No newline at end of file