diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..176c77d --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,10 @@ +pipeline: + publish: + image: plugins/docker + secrets: [ docker_username, docker_password ] + settings: + repo: chewingbever/pieter + tag: ${CI_COMMIT_TAG} + when: + branch: main + event: tag diff --git a/app.py b/app.py index 789b8fa..60c40f9 100644 --- a/app.py +++ b/app.py @@ -57,11 +57,13 @@ def upload_file(): file.save(path) # Run repo-add on the file - res = subprocess.run(["repo-add", path.parent.parent / "repo.db.tar.gz", path]) + res = subprocess.run(["repo-add", path.parent.parent / "pieter.db.tar.gz", path]) if res.returncode != 0: path.unlink() return {'message': 'Failed to add file to repository.'}, 500 + print(f"Uploaded {file}") + return {'message': 'Success.'}, 200