hopefully this will sort it
This commit is contained in:
parent
3a9f3e94ea
commit
f4a11ec9cd
|
@ -20,8 +20,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
firstString=${{ github.ref_name }}
|
firstString=${{ github.ref_name }}
|
||||||
secondString="develop-"
|
secondString="develop-"
|
||||||
echo ::set-env name=PRODUCTION_BRANCH::${firstString/format-/"$secondString"}
|
echo ::set-env name=DEVELOPMENT_BRANCH::${firstString/format-/"$secondString"}
|
||||||
- name: clone
|
- name: push development
|
||||||
env:
|
env:
|
||||||
CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts
|
CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts
|
||||||
CI_COMMIT_AUTHOR: Continuous Integration
|
CI_COMMIT_AUTHOR: Continuous Integration
|
||||||
|
@ -29,12 +29,12 @@ jobs:
|
||||||
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
||||||
git config --global user.email "username@users.noreply.github.com"
|
git config --global user.email "username@users.noreply.github.com"
|
||||||
git fetch --depth=1
|
git fetch --depth=1
|
||||||
git .add -A
|
git add -A
|
||||||
git commit -m "${{ env.CI_COMMIT_MESSAGE }}
|
git commit -m "${{ env.CI_COMMIT_MESSAGE }}
|
||||||
|
|
||||||
converted from batch"
|
converted from batch"
|
||||||
git merge origin/master --strategy-option=ours
|
git merge origin/master --strategy-option=ours
|
||||||
git push -f origin HEAD:${{ env.PRODUCTION_BRANCH }}
|
git push -f origin HEAD:${{ env.DEVELOPMENT_BRANCH }}
|
||||||
|
|
||||||
- name: GIT commit and push all changed files
|
- name: GIT commit and push all changed files
|
||||||
env:
|
env:
|
||||||
|
@ -43,21 +43,21 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
||||||
git config --global user.email "username@users.noreply.github.com"
|
git config --global user.email "username@users.noreply.github.com"
|
||||||
git checkout -b ${{ env.PRODUCTION_BRANCH }}
|
git checkout -b ${{ env.DEVELOPMENT_BRANCH }}
|
||||||
git add -A
|
git add -A
|
||||||
git status
|
git status
|
||||||
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }} xml files converted to yml"
|
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }} xml files converted to yml"
|
||||||
git push -f origin HEAD:${{ env.PRODUCTION_BRANCH }}
|
git push -f origin HEAD:${{ env.DEVELOPMENT_BRANCH }}
|
||||||
- name: make pull request
|
- name: make pull request
|
||||||
#git fetch
|
#git fetch
|
||||||
# git merge origin/master --allow-unrelated-histories --strategy-option=ours
|
# git merge origin/master --allow-unrelated-histories --strategy-option=ours
|
||||||
# git push origin HEAD:${{ env.PRODUCTION_BRANCH }}
|
# git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }}
|
||||||
run: |
|
run: |
|
||||||
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.TEA_TOKEN }}
|
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.TEA_TOKEN }}
|
||||||
if [[ $(./tea pr ls -f=base,head | grep "| master | ${{ env.PRODUCTION_BRANCH }} |" | head -c1 | wc -c) -eq 0 ]]; then
|
if [[ $(./tea pr ls -f=base,head | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | head -c1 | wc -c) -eq 0 ]]; then
|
||||||
./tea pr c --base=master --head=${{ env.PRODUCTION_BRANCH }} --description="development pull request" -t="WIP: ${{ github.event.head_commit.message }}"
|
./tea pr c --base=master --head=${{ env.DEVELOPMENT_BRANCH }} --description="development pull request" -t="WIP: ${{ github.event.head_commit.message }}"
|
||||||
fi
|
fi
|
||||||
rm ./tea
|
rm ./tea
|
||||||
- uses: https://github.com/gilesbradshaw/batch2yaml@master
|
- uses: https://github.com/gilesbradshaw/batch2yaml@master
|
||||||
|
@ -70,12 +70,12 @@ jobs:
|
||||||
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 pr ls -f=base,head,index
|
./tea pr ls -f=base,head,index
|
||||||
./tea pr ls -f=base,head,index | grep "| master | ${{ env.PRODUCTION_BRANCH }} |"
|
./tea pr ls -f=base,head,index | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |"
|
||||||
./tea pr ls -f=base,head,index | grep "| master | ${{ env.PRODUCTION_BRANCH }} |" | tr -d ' '
|
./tea pr ls -f=base,head,index | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | tr -d ' '
|
||||||
./tea pr ls -f=base,head,index | grep "| master | ${{ env.PRODUCTION_BRANCH }} |" | tr -d ' ' | tr "|" "\n"
|
./tea pr ls -f=base,head,index | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | tr -d ' ' | tr "|" "\n"
|
||||||
./tea pr ls -f=base,head,index | grep "| master | ${{ env.PRODUCTION_BRANCH }} |" | tr -d ' ' | tr "|" "\n" | head -n 4 |
|
./tea pr ls -f=base,head,index | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | tr -d ' ' | tr "|" "\n" | head -n 4 |
|
||||||
./tea pr ls -f=base,head,index | grep "| master | ${{ env.PRODUCTION_BRANCH }} |" | tr -d ' ' | tr "|" "\n" | head -n 4 | tail -1
|
./tea pr ls -f=base,head,index | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | tr -d ' ' | tr "|" "\n" | head -n 4 | tail -1
|
||||||
echo ::set-env name=PR::$(./tea pr ls -f=base,head,index | grep "| master | ${{ env.PRODUCTION_BRANCH }} |" | tr -d ' ' | tr "|" "\n" | head -n 4 | tail -1)
|
echo ::set-env name=PR::$(./tea pr ls -f=base,head,index | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | tr -d ' ' | tr "|" "\n" | head -n 4 | tail -1)
|
||||||
echo $PR
|
echo $PR
|
||||||
rm ./tea
|
rm ./tea
|
||||||
- name: get build branch name
|
- name: get build branch name
|
||||||
|
|
Loading…
Reference in New Issue