File tree 3 files changed +42
-29
lines changed
3 files changed +42
-29
lines changed Original file line number Diff line number Diff line change
1
+ name : " test_and_badge"
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ - main
8
+
9
+ jobs :
10
+ test_and_badge :
11
+ name : " Test and Badge"
12
+ runs-on : " ubuntu-latest"
13
+ steps :
14
+ - name : " Prepare"
15
+ run : |
16
+ sudo apt-get update
17
+ sudo apt-get install -y curl git
18
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
19
+ source $HOME/.cargo/env
20
+ rustup toolchain install nightly
21
+ git clone https://github.com/deinstapel/cursive-multiplex.git
22
+
23
+ - name : " Build and Test"
24
+ run : |
25
+ cd cursive-multiplex
26
+ RUST_CHAIN=stable ./scripts/ci-build.sh
27
+ RUST_CHAIN=nightly ./scripts/ci-build.sh
28
+
29
+ - name : " Deploy Badge"
30
+ env :
31
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+ run : |
33
+ cd cursive-multiplex
34
+ ./scripts/deploy-badges.sh
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,26 +5,28 @@ die() {
5
5
exit 1
6
6
}
7
7
8
- if [ -z " $GITHUB_USERNAME " ]
8
+ if [ -z " $GITHUB_ACTOR " ]
9
9
then
10
- die " the GITHUB_USERNAME environment variable is not set"
10
+ die " the GITHUB_ACTOR environment variable is not set"
11
11
fi
12
12
13
13
if [ -z " $GITHUB_TOKEN " ]
14
14
then
15
15
die " the GITHUB_TOKEN environment variable is not set"
16
16
fi
17
17
18
- if [ -z " $GITHUB_REPO_SLUG " ]
18
+ if [ -z " $GITHUB_REPOSITORY " ]
19
19
then
20
- die " the GITHUB_REPO_SLUG environment variable is not set"
20
+ die " the GITHUB_REPOSITORY environment variable is not set"
21
21
fi
22
22
23
23
(
24
24
cd " $( git rev-parse --show-toplevel) /target/shields" || die " cannot find project root!"
25
- repo=" https://${GITHUB_USERNAME } :${GITHUB_TOKEN} @github.com/${GITHUB_REPO_SLUG } .git"
25
+ repo=" https://${GITHUB_ACTOR } :${GITHUB_TOKEN} @github.com/${GITHUB_REPOSITORY } .git"
26
26
tmp_dir=$( mktemp -d -t cursive-multiplex-deploy-XXXXXXXX)
27
27
28
+ git config --global user.email " runner@ci"
29
+ git config --global user.name " Github CI Runner"
28
30
try=0
29
31
while : ; do
30
32
if ! git clone --branch gh-pages " $repo " " $tmp_dir "
42
44
(
43
45
cd " $tmp_dir " || die " failed to enter temporary directory"
44
46
git add -A
45
- git commit -m " Travis CI badge deployment"
47
+ git commit -m " Github CI badge deployment"
46
48
git push origin gh-pages:gh-pages
47
49
)
48
50
You can’t perform that action at this time.
0 commit comments