From 031a2bfd7d55613e9c6863c71c6eed6bdb4fdcb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Tue, 8 Nov 2022 17:49:50 +0000 Subject: [PATCH] try to push to sourcehut --- .woodpecker.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 38e13834..933c89a1 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,7 +2,20 @@ pipeline: check: image: nixpkgs/nix-flakes:latest pull: true - secrets: [ sourcehut_token ] commands: - nix --no-sandbox flake info - nix --no-sandbox develop -c statix check + + push-to-sourcehut: + image: nixpkgs/nix-flakes:latest + pull: true + secrets: [ ssh_public_key ssh_private_key ] + commands: + - mkdir -p ~/.ssh/ + - echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519 + - echo "$SSH_PUBLIC_KEY" > ~/.ssh/id_ed25519.pub + - echo "StrictHostKeyChecking=accept-new" >> ~/.ssh/config + - chmod 0400 ~/.ssh/ -R + - git remote add sourcehut git@git.sr.ht:~cyplo/dotfiles + - git push sourcehut --tags --force-with-lease + - git push sourcehut --all --force-with-lease