From 8f2df84d66ef2ef03bd04654f3ac57e7ae7f43d2 Mon Sep 17 00:00:00 2001 From: dadada Date: Sun, 28 May 2023 20:59:57 +0200 Subject: [PATCH] Enable use in GitLab CI --- README.md | 17 +++++++++++++++++ flake.nix | 8 +------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c2a9acf..be8fcfb 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,20 @@ Archives the list of URLs provided on the standard input. go build pad-archiver < pads.txt ``` + +## Examples + +## Using in GitLab CI + +``` +Archive pads: + image: ghcr.io/dadada/pad-archiver + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + script: + - --push --url "${CI_PROJECT_URL}.git" --username gitlab-ci-token --password "${CI_ACCESS_TOKEN}" < pads.txt +``` + +## As a GitHub action + +*TODO* diff --git a/flake.nix b/flake.nix index 49d404e..382d698 100644 --- a/flake.nix +++ b/flake.nix @@ -16,13 +16,7 @@ name = "pad-archiver"; tag = "latest"; contents = [ pad-archiver ]; - extraCommands = '' - mkdir -p repo - ''; - config = { - WorkingDir = "/repo"; - Entrypoint = [ "${pad-archiver}/bin/pad-archiver" ]; - }; + config.Entrypoint = [ "/bin/pad-archiver" ]; }; }; checks = {