Skip to content

making workflow push work #5

making workflow push work

making workflow push work #5

Workflow file for this run

name: Merge MD Files
on:
push:
branches: [ master ]
permissions:
contents: write
jobs:
merge-md:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Define file order
run: |
FILE_ORDER='[/index.md, /ssh.md]' > order.txt
- name: Read file order
run: |
ORDER=$(cat order.txt)
- name: Create initial README
run: echo '' > README.md
- name: Append each file in order
run: |
IFS=',' read -r -a files <<< "$ORDER"
for f in "${files[@]}"; do
cat "$f" >> README.md
echo "" >> README.md
done
- name: Commit changes
run: |
git config user.name "shoaib wani"
git config user.email "wanishoaib@protonmail.com"
git add README.md
git commit -m "Merge MD files in specified order"
git push -u https://pyloris:${{ secrets.GITHUB_TOKEN }}@github.com/Pyloris/linuxKing.git master