WIP: automation/pull-mirror: Initial declaration #2
18
.drone.yml
Executable file
18
.drone.yml
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Sync Upstream
|
||||||
|
image: alpine:3.16.2
|
||||||
|
environment:
|
||||||
|
USERNAME:
|
||||||
|
from_secret: dotya_username
|
||||||
|
TOKEN:
|
||||||
|
from_secret: dotya_token
|
||||||
|
commands:
|
||||||
|
- apk add guile git # Install dependencies
|
||||||
|
- git config --global --add safe.directory /drone/src # Stupid drone issue
|
||||||
|
- git checkout upstream
|
||||||
|
- git pull
|
||||||
|
- git push "https://$USERNAME:$TOKEN@git.dotya.ml/kreyren/guix-kreyren.git" upstream
|
35
automation/sync-upstream.ss
Executable file
35
automation/sync-upstream.ss
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
exec guile -s "$0" "$@"
|
||||||
|
!#
|
||||||
|
;;; DNM: Title
|
||||||
|
;;; Copyright (C) 2022 Jacob Hrbek <kreyren@rixotstudio.cz>
|
||||||
|
;;;
|
||||||
|
;;; This file is Free/Libre Open-Source Software; you may copy, redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
|
||||||
|
;;; This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
;;;
|
||||||
|
;;; You should have received a copy of the GNU General Public license along with this project. If not, see <http://www.gnu.org/licenses>
|
||||||
|
|
||||||
|
(use-modules (devops-tools sync-git-repository)
|
||||||
|
(devops-tools utils))
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
;;;
|
||||||
|
;;; GNU Guile script designed to run every 10min to sync fork repository with the upstream
|
||||||
|
;;;
|
||||||
|
;;; Requires the following environment variables to be set:
|
||||||
|
;;; * USERNAME = Name of the user used for pushing
|
||||||
|
;;; * TOKEN = User Token or Password for pushing
|
||||||
|
;;;
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(sync-git-repository #:source-repo "https://git.savannah.gnu.org/git/guix.git"
|
||||||
|
#:source-branch "master"
|
||||||
|
;#:target-repo %repo-dir
|
||||||
|
#:target-repo "/home/kreyren/Repositories/guix"
|
||||||
|
#:target-branch "upstream"
|
||||||
|
#:push? #t
|
||||||
|
#:username (get-variable "USERNAME")
|
||||||
|
#:token (get-variable "TOKEN")
|
||||||
|
#:forge "https://git.dotya.ml/kreyren/guix-kreyren.git")
|
||||||
|
|
||||||
|
;;; sync-upstream.scm ends here
|
1
automation/zz-README.org
Normal file
1
automation/zz-README.org
Normal file
@ -0,0 +1 @@
|
|||||||
|
Directory storing scripts used by Continuous Integration and Delivery ("CI/CD")
|
Loading…
Reference in New Issue
Block a user