Skip to content

Commit f2a7001

Browse files
committed
n
1 parent 4ac554b commit f2a7001

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/lint.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ jobs:
2727
run: ./diagram > diagram.md
2828
- name: Save the diagram
2929
run: |
30-
git status
31-
git remote
32-
ref=$( git symbolic-ref HEAD )
33-
git branch -D ${ref}-diagram || :
34-
git checkout -b ${ref}-diagram
3530
git add diagram.md
31+
git status
32+
git remote -v
33+
new_branch="${{ github.ref_name }}-diagram"
34+
git branch -D "${new_branch}" || :
35+
git checkout -b "${new_branch}"
36+
git config user.name "${{ github.workflow }}"
37+
git config user.email "github-actions@example.com"
3638
git commit -m "Diagram saved by lint.yml workflow"
37-
git push
39+
git push --set-upstream "$( git remote )" "${new_branch}"

0 commit comments

Comments
 (0)