Compare commits
1 Commits
15a9696d4c
...
7331c6388a
Author | SHA1 | Date |
---|---|---|
Continuous Integration | 7331c6388a |
|
@ -49,8 +49,7 @@ jobs:
|
||||||
CI_COMMIT_AUTHOR: Continuous Integration
|
CI_COMMIT_AUTHOR: Continuous Integration
|
||||||
run: |
|
run: |
|
||||||
if [[ $(git branch -r | grep -Fx origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -eq 0 ]]; then
|
if [[ $(git branch -r | grep -Fx origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -eq 0 ]]; then
|
||||||
echo no development branch so pushing
|
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
|
||||||
git push origin -f HEAD:${{ env.DEVELOPMENT_BRANCH }};
|
|
||||||
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea;
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea;
|
||||||
chmod +x ./tea;
|
chmod +x ./tea;
|
||||||
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }};
|
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }};
|
||||||
|
@ -60,7 +59,7 @@ jobs:
|
||||||
echo 'pushed new branch and created pr';
|
echo 'pushed new branch and created pr';
|
||||||
else
|
else
|
||||||
if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then
|
if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then
|
||||||
git push -f origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
|
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
|
||||||
else
|
else
|
||||||
echo 'no changes so no push'
|
echo 'no changes so no push'
|
||||||
fi;
|
fi;
|
||||||
|
|
|
@ -27,6 +27,7 @@ jobs:
|
||||||
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}
|
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}
|
||||||
pr=$(./tea pr ls -f=base,head,index -o csv | grep "\"master\",\"${{ github.ref_name }}\"" | tr -d ' ' | tr "," "\n" | head -n 4 | tail -1)
|
pr=$(./tea pr ls -f=base,head,index -o csv | grep "\"master\",\"${{ github.ref_name }}\"" | tr -d ' ' | tr "," "\n" | head -n 4 | tail -1)
|
||||||
export PR="${pr//[\"\'\`]/}"
|
export PR="${pr//[\"\'\`]/}"
|
||||||
|
echo ::set-env name=PR::$PR
|
||||||
rm ./tea
|
rm ./tea
|
||||||
- run: git fetch
|
- run: git fetch
|
||||||
- name: get build branch name
|
- name: get build branch name
|
||||||
|
|
Loading…
Reference in New Issue