Skip to content

Commit 298481e

Browse files
RetzohRetzoh
authored andcommitted
manifest: backup master on github
manifest: backup master on github manifest remove dead code update manifest secrets
1 parent e31c507 commit 298481e

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
# Except:
55
!.gitignore
6+
!.build.yml

0 commit comments

Comments
 (0)