Skip to content

Commit f51678f

Browse files
authored
Use shared update-step action (#26)
skills/action-update-step
1 parent 66417ef commit f51678f

File tree

1 file changed

+8
-29
lines changed

1 file changed

+8
-29
lines changed

.github/workflows/3-merge-your-pull-request.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,32 +54,11 @@ jobs:
5454
with:
5555
fetch-depth: 0 # Let's get all the branches.
5656

57-
# Custom step finish here: close 3; open 4, 5, and X; set step to X
58-
- name: Update to open remaining steps
59-
run: |
60-
echo "Check that we are on FROM_STEP"
61-
if [ "$(cat .github/steps/-step.txt)" != $FROM_STEP ]
62-
then
63-
echo "Current step is not $FROM_STEP"
64-
exit 0
65-
fi
66-
67-
echo "Make sure we are on the main branch"
68-
git checkout main
69-
70-
echo "TODO UPDATE NEEDED"
71-
72-
echo "Update the step file to TO_STEP"
73-
echo "$TO_STEP" > .github/steps/-step.txt
74-
75-
echo "Commit the files, and push to main"
76-
git config user.name github-actions
77-
git config user.email github-actions@github.com
78-
git add README.md
79-
git add .github/steps/-step.txt
80-
git commit --message="Update to $TO_STEPin step and README.md"
81-
git push
82-
env:
83-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84-
FROM_STEP: 3
85-
TO_STEP: X
57+
# In README.md, switch step 3 for step 45X.
58+
- name: Update to step 45X
59+
uses: skills/action-update-step@v2
60+
with:
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
from_step: 3
63+
to_step: 45X
64+
branch_name: cd

0 commit comments

Comments
 (0)