Update pipelines_index.json #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Process Pipelines | |
on: | |
push: {branches: main, paths: pipelines/**} | |
jobs: | |
pipeprocess: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create new branch and run script | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- run: | | |
git branch generate-file-branch-${{ github.run_id }}-${{ github.run_attempt }} | |
git push --set-upstream origin generate-file-branch-${{ github.run_id }}-${{ github.run_attempt }} | |
git checkout generate-file-branch-${{ github.run_id }}-${{ github.run_attempt }} | |
python .github/workflows/process.py | |
if [[ "$(git diff --exit-code ./pipelines/pipelines_index.json)" =~ 'diff' ]]; then echo "IS_VALID=true" >> $GITHUB_ENV; else echo "IS_VALID=false" >> $GITHUB_ENV ;fi | |
- if: ${{ env.IS_VALID == 'true' }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "vb-bot" | |
git add . | |
git commit -m "Update pipelines_index.json" | |
git push | |
gh pr create -B main --title 'Update pipelines_index.json' --body 'Update pipelines index' | |
env: | |
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | |