Skip to content

Commit 67fde5c

Browse files
committed
updated exercise to include step workflow for creating merge conflict
1 parent 0257976 commit 67fde5c

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

.github/workflows/1-create-a-pr.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,31 @@ jobs:
2727
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
2828

2929
steps:
30-
- name: Checkout
30+
- name: Checkout repository
3131
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Prepare a merge conflict
36+
run: |
37+
echo "Create my-resume branch"
38+
git checkout -b my-resume
39+
git config user.name github-actions[bot]
40+
git config user.email github-actions[bot]@users.noreply.github.com
41+
sed -i 's/1/2/' .github/steps/-step.txt
42+
git add .github/steps/-step.txt
43+
git commit -m "Update step in my-resume"
44+
git push origin my-resume
3245
46+
echo "Create conflicting commit on main"
47+
git checkout main
48+
sed -i 's/Experience/Jobs/' resume.md
49+
git add resume.md
50+
git commit -m "Update resume.md in main"
51+
git push origin main
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
3355
- name: Get response templates
3456
uses: actions/checkout@v4
3557
with:

index.html

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)