@@ -20,11 +20,11 @@ jobs:
20
20
name : Start Exercise
21
21
uses :
skills/exercise-toolkit/.github/workflows/[email protected]
22
22
with :
23
- exercise-title : " Review Pull Requests "
24
- intro-message : " Let's learn to collaborate with others using pull requests ."
23
+ exercise-title : " Resolve Merge Conflicts "
24
+ intro-message : " Let's learn how to resolve merge conflicts when collaborating on GitHub ."
25
25
26
- modify_repo_content :
27
- name : Modify repo content
26
+ prepare_merge_conflict :
27
+ name : Prepare merge conflict
28
28
runs-on : ubuntu-latest
29
29
needs : [start_exercise]
30
30
env :
@@ -33,25 +33,24 @@ jobs:
33
33
steps :
34
34
- name : Checkout
35
35
uses : actions/checkout@v4
36
+ with :
37
+ fetch-depth : 0
36
38
37
- - name : Prepare a branch and pull request
39
+ - name : Simulate conflict between main and my-resume
38
40
run : |
39
-
40
- echo "Make a branch"
41
- BRANCH=update-game
42
- git checkout -b $BRANCH
43
-
44
- echo "Update index.html"
45
- sed -i.bak 's/Game over/Game over, refresh to play again 🧑💻 🤖!/' index.html
46
-
47
- echo "Make a commit"
41
+ git checkout -b my-resume
48
42
git config user.name github-actions[bot]
49
43
git config user.email github-actions[bot]@users.noreply.github.com
50
- git add index.html index.html.bak
51
- git commit --message="Update game over message"
52
-
53
- echo "Push"
54
- git push --set-upstream origin $BRANCH
44
+ sed -i 's/1/2/' .github/steps/-step.txt
45
+ git add .github/steps/-step.txt
46
+ git commit -m "Update step in my-resume"
47
+ git push origin my-resume
48
+
49
+ git checkout main
50
+ sed -i 's/Experience/Jobs/' resume.md
51
+ git add resume.md
52
+ git commit -m "Update resume.md in main"
53
+ git push origin main
55
54
env :
56
55
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
57
56
@@ -73,22 +72,12 @@ jobs:
73
72
path : exercise-toolkit
74
73
ref : v0.5.0
75
74
76
- - name : Build comment - add step content
77
- id : build-comment
78
- uses : skills/action-text-variables@v2
79
- with :
80
- template-file : ${{ env.STEP_1_FILE }}
81
- template-vars : |
82
- login: ${{ github.actor }}
83
- full_repo_name: ${{ github.repository }}
84
-
85
75
- name : Create comment - add step content
86
76
run : |
87
77
gh issue comment "$ISSUE_URL" \
88
- --body "$ISSUE_BODY "
78
+ --body-file "$STEP_1_FILE "
89
79
env :
90
80
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91
- ISSUE_BODY : ${{ steps.build-comment.outputs.updated-text }}
92
81
93
82
- name : Create comment - watching for progress
94
83
run : |
0 commit comments