batch-example/.gitea/workflows/convert-built-to-yml.yml

60 lines
2.3 KiB
YAML
Raw Normal View History

2023-10-23 01:18:58 +00:00
name: convert-built-to-yml
2023-10-21 14:30:59 +00:00
run-name: ${{ github.actor }} is learning GitHub Actions
2023-10-21 15:50:07 +00:00
on:
push:
branches:
2023-10-23 01:18:58 +00:00
- 'build/**'
2023-10-21 14:30:59 +00:00
jobs:
2023-10-21 22:02:34 +00:00
develop-branch:
2023-10-21 14:30:59 +00:00
runs-on: ubuntu-latest
steps:
2023-10-22 00:44:25 +00:00
# https://github.com/RouxAntoine/checkout/tree/v3.5.4
2023-10-22 10:31:32 +00:00
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
with:
token: ${{ secrets.BOT_TOKEN }}
2023-10-22 10:20:17 +00:00
- uses: http://sigyl.com:3000/actions/setup-node@v3
2023-10-21 14:30:59 +00:00
with:
2023-10-21 14:57:26 +00:00
node-version: '20'
- name: get development branch name
2023-10-21 19:08:31 +00:00
run: |
firstString=${{ github.ref_name }}
2023-10-23 01:18:58 +00:00
secondString="develop"
echo ::set-env name=DEVELOPMENT_BRANCH::${firstString/build\//"$secondString"\/}
- name: GIT push
env:
CI_COMMIT_MESSAGE: converted to yml for review.
CI_COMMIT_AUTHOR: Continuous Integration
run: |
2023-10-23 01:18:58 +00:00
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "username@users.noreply.github.com"
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }}
- uses: http://sigyl.com:3000/actions/batch2yaml@master
with:
action: yml
path: '.'
- name: GIT commit and push all changed files
2023-10-22 09:23:43 +00:00
env:
CI_COMMIT_MESSAGE: converted to yml for review.
2023-10-22 09:23:43 +00:00
CI_COMMIT_AUTHOR: Continuous Integration
2023-10-22 00:27:58 +00:00
run: |
2023-10-22 09:23:43 +00:00
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "username@users.noreply.github.com"
2023-10-23 01:18:58 +00:00
# git checkout -b ${{ env.DEVELOPMENT_BRANCH }}
2023-10-22 09:26:34 +00:00
git add -A
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }} xml files converted to yml"
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }}
#- name: push development
# env:
# CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts
# CI_COMMIT_AUTHOR: Continuous Integration
# run: |
# git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
# git config --global user.email "username@users.noreply.github.com"
# git fetch --depth=1
# git add -A
# git commit -m "${{ env.CI_COMMIT_MESSAGE }}
#
# converted from batch"
# git merge origin/master --strategy-option=ours --allow-unrelated
# git push -f origin HEAD:${{ env.DEVELOPMENT_BRANCH }}