fixup .drone.yml
This commit is contained in:
parent
19dbbf5865
commit
f9e01d2f2c
1 changed files with 25 additions and 15 deletions
40
.drone.yml
40
.drone.yml
|
@ -35,31 +35,39 @@ steps:
|
||||||
touch ../pr-message.txt
|
touch ../pr-message.txt
|
||||||
fi
|
fi
|
||||||
- name: Push git
|
- name: Push git
|
||||||
image: appleboy/drone-git-push
|
image: alpine:latest
|
||||||
settings:
|
commands:
|
||||||
ssh_key:
|
- apk add git openssh git-lfs
|
||||||
from_secret: SSH_KEY
|
- mkdir ~/.ssh
|
||||||
remote: gitea@git.chir.rs:darkkirb/nixos-config.git
|
- echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
||||||
branch: update-flake
|
- chmod 600 ~/.ssh/id_ed25519
|
||||||
force: true
|
- echo "git.chir.rs ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQ77jA9S5qXDFGPLZRsC++AtxiXXeF8gVbkLlglx0GQ" > ~/.ssh/known_hosts
|
||||||
commit: true
|
- echo "git.chir.rs ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDY0pZzNTAqaVqqfC31gYFixFs5KySv0UqvlDEAzEXJMB/pBWkE5GAd5Ik1NxD4QiAVWc2UARdmJEBbYf8mk5JiAv6fjsodJdJVRau4Ax7FtIfbxdFyzBgFery/KUnNIr6cmAWU2Af8JhzrnpEbhe5U3LftYnkdE1lI+iVqaQRARp0qikdzoAl3uMUhbdTxp1/6rtfN6bP2XZCsUx3t3W5ZG1QTQz8l7nrbXZX1TT3pZ2vcUANcMtOxEAwO6lbL210GX63C8XEoE7+4lLxRrSiaq3SkVlG07VspozKEtrrcsqCRNLebiaapmNWVoEq9Wd9VGAEjja5efyU6/HUlRogAOo1WP73UwoQLv5LTFH+ECoHhKS14xfPeXeVG8dbYyh5+CnmiVe43dH1qZw+ceYuYel31f47cAgScbxFvNkct0spK9m9mivnoUmYcxwTc+VbFbmnJvSuZw3a+OEYn9biitP/tTkYFiLZVdPZTxDkvd1oOyuVH9d4RMXbVgNS92/lr2iKFZkyhWMJ61hFMc2tupwmkp5Us5ce42XA0zC/aVY3vYoih/c5Ib0eZF1AEJdB6Bt5dWqITVsB3mip3Jn/mqVBIPTGXT6+FnGSEuL68Dj2yKBD7kj8YO/1SWpkVMy+bfoLXY/usgcaLCxpUu8dDrdrcKExLigCVbi3rdRmg7w==" >> ~/.ssh/known_hosts
|
||||||
commit_message: Update flake
|
- git remote set-url origin gitea@git.chir.rs:darkkirb/nix-packages.git
|
||||||
author_name: Gitea Bot
|
- git config --global 'user.email' 'gitea-bot@chir.rs'
|
||||||
author_email: gitea-bot@chir.rs
|
- git config --global 'user.name' 'Gitea Bot'
|
||||||
|
- git add .
|
||||||
|
- git commit -am "Update flake"
|
||||||
|
- git push --force origin main:update-flake
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
commands:
|
commands:
|
||||||
- apk add jq curl
|
- apk add jq curl
|
||||||
- |
|
- |
|
||||||
echo '{ "assignee": "DarkKirb", "base": "main", "head": "update-flake", "title": "Update flake" }' | jq '.body = $body' --arg body "$(cat ../pr-message.txt)" | curl -XPOST 'https://git.chir.rs/api/v1/repos/DarkKirb/nixos-config/pulls' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $AUTHORISATION" -d-
|
echo '{ "assignee": "DarkKirb", "base": "main", "head": "update-flake", "title": "Update flake" }' | jq '.body = $body' --arg body "$(cat ../pr-message.txt)" | curl -XPOST 'https://git.chir.rs/api/v1/repos/DarkKirb/nixos-config/pulls' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $AUTHORISATION" -data-binary @-
|
||||||
environment:
|
environment:
|
||||||
AUTHORISATION:
|
AUTHORISATION:
|
||||||
from_secret: GITEA_KEY
|
from_secret: GITEA_KEY
|
||||||
|
#trigger:
|
||||||
|
# event:
|
||||||
|
# - cron
|
||||||
|
# cron:
|
||||||
|
# - updater
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- cron
|
- push
|
||||||
cron:
|
branch:
|
||||||
- updater
|
- main
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
@ -120,3 +128,5 @@ steps:
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
|
Loading…
Reference in a new issue