File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -50,17 +50,27 @@ jobs:
50
50
steps :
51
51
- uses : actions/checkout@v3
52
52
with :
53
- fetch-depth : 0
53
+ fetch-depth : 0
54
54
- name : Install jstyleson
55
55
run : pip3 install jstyleson
56
56
- name : Update size
57
57
run : python3 .github/update_size.py
58
- - name : Switch to develop branch
58
+
59
+ - name : Determine branch and switch
60
+ id : branch_info
59
61
run : |
60
- git checkout develop
61
- - name : Commit changes
62
+ if [ -z "$GITHUB_HEAD_REF" ]; then
63
+ branch_name=$(git symbolic-ref --short HEAD)
64
+ else
65
+ branch_name=$GITHUB_HEAD_REF
66
+ fi
67
+ echo "branch_name=$branch_name" >> $GITHUB_ENV
68
+ echo "Switched to branch: $branch_name"
69
+
70
+ - name : Commit changes to the correct branch
62
71
uses : EndBug/add-and-commit@v9
63
72
with :
64
73
default_author : github_actions
65
74
message : Update sizes
66
75
add : ' *.json'
76
+ push : --force
You can’t perform that action at this time.
0 commit comments