Skip to content

Commit

Permalink
Set branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Fish committed Sep 6, 2024
1 parent 8c52fbc commit befcb09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/README from docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ jobs:
echo "$template"
}
sub_doc_parts_from "$(sub_doc_parts_from "$(<template.md)" "sections")" "help">../README.md
- name: Push
- name: Setup git
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add README.md
- name: Push
run: |
if ! git diff-index --quiet HEAD --; then
branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
git add docs/help/*
git commit -m "Automated update of README.md from docs"
git push
git push origin HEAD:$branch_name
fi
8 changes: 5 additions & 3 deletions .github/workflows/generate_help_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ jobs:
python -m sim_recon.cli.parsing.otf '--help' >docs/help/sim_otf.txt
python -m sim_recon.cli.parsing.recon '--help' >docs/help/sim_recon.txt
python -m sim_recon.cli.parsing.otf_view '--help' >docs/help/otf_view.txt
- name: Push
- name: Setup git
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
- name: Push
run: |
if ! git diff-index --quiet HEAD --; then
branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
git add docs/help/*
git commit -m "Automated update of help docs"
git push
git push origin HEAD:$branch_name
fi

0 comments on commit befcb09

Please sign in to comment.