File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ image : debian/stable
2+ sources :
3+ - https://git.sr.ht/~retzoh/bash_functions
4+ environment :
5+ REPOSITORY_NAME : bash_functions
6+ PACKAGE_NAME : bash_functions
7+ PACKAGE_FOLDER : bash_functions
8+ PACKAGE_PATH : .
9+ GIT_SR_HT_URL :
[email protected] :~retzoh/bash_functions 10+ GITHUB_URL :
[email protected] :Retzoh/bash_functions.git 11+ secrets :
12+ - ed37ce69-d5be-42df-9b92-41471089d431 # ~/.ssh/known_hosts
13+ - 899472e5-1ec8-4211-a00b-05a0d3eaf775 # ~/.ssh/.github_deploy_ssh_key
14+ tasks :
15+ - deploy_master : |
16+ ln -sf ~/.ssh/.build_test_ssh_key ~/.ssh/id_rsa
17+
18+ cd "$REPOSITORY_NAME"
19+ git remote set-url origin $GIT_SR_HT_URL
20+ lines=`git diff --stat origin/master..HEAD | wc -l`
21+ if [ $lines -eq 0 ]
22+ then
23+
24+ # deploy code
25+ git config --global user.email "~retzoh/[email protected] " 26+ git config --global user.name "Deploy"
27+
28+ ln -sf ~/.ssh/.github_deploy_ssh_key ~/.ssh/id_rsa
29+ git checkout -B master -t origin/master
30+ git remote set-url origin $GITHUB_URL
31+ git push --set-upstream origin master
32+
33+ else
34+
35+ echo "Aborting github deployment: HEAD is dirty compared to master."
36+
37+ fi
Original file line number Diff line number Diff line change 33
44# Except:
55! .gitignore
6+ ! .build.yml
You can’t perform that action at this time.
0 commit comments