Skip to content

Commit e58ab18

Browse files
authored
Merge pull request #113 from MicrosoftCloudEssentials-LearningHub/testing-e2e
testing pipeline
2 parents a51ac3a + d13b950 commit e58ab18

15 files changed

Lines changed: 78 additions & 46 deletions

File tree

.github/workflows/update-md-date.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- name: Checkout repository
17+
- name: Checkout PR branch
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21+
ref: ${{ github.event.pull_request.head.ref }}
2122

2223
- name: Set up Python
2324
uses: actions/setup-python@v4
@@ -35,13 +36,13 @@ jobs:
3536
- name: Update last modified date in Markdown files
3637
run: python .github/workflows/update_date.py
3738

38-
- name: Commit changes
39+
- name: Pull (merge) remote changes, commit, and push if needed
3940
env:
4041
TOKEN: ${{ secrets.GITHUB_TOKEN }}
4142
run: |
42-
git fetch origin ${{ github.event.pull_request.head.ref }}
43-
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
43+
BRANCH="${{ github.event.pull_request.head.ref }}"
44+
git pull origin "$BRANCH" || echo "No merge needed"
4445
git add -A
4546
git commit -m "Update last modified date in Markdown files" || echo "No changes to commit"
4647
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
47-
git push origin HEAD:${{ github.event.pull_request.head.ref }}
48+
git push origin HEAD:"$BRANCH"

.github/workflows/use-visitor-counter.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,40 +57,32 @@ jobs:
5757
git config --global user.name "github-actions[bot]"
5858
git config --global user.email "github-actions[bot]@users.noreply.github.com"
5959
60-
# Commit and push logic for PR events
60+
# Commit and push logic for PR events (merge, not rebase)
6161
- name: Commit and push changes (PR)
6262
if: github.event_name == 'pull_request'
6363
env:
6464
TOKEN: ${{ secrets.GITHUB_TOKEN }}
6565
run: |
6666
git fetch origin
6767
git checkout ${{ github.head_ref }}
68-
git add "*.md" metrics.json
68+
git pull origin ${{ github.head_ref }} || echo "No merge needed"
69+
git add "*.md" || true
70+
[ -f metrics.json ] && git add metrics.json || true
6971
git commit -m "Update visitor count" || echo "No changes to commit"
7072
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
71-
git pull --rebase origin ${{ github.head_ref }} || echo "No rebase needed"
7273
git push origin HEAD:${{ github.head_ref }}
7374
74-
# Commit and push logic for non-PR events (schedule, workflow_dispatch)
75+
# Commit and push logic for non-PR events (merge, not rebase)
7576
- name: Commit and push changes (non-PR)
7677
if: github.event_name != 'pull_request'
7778
env:
7879
TOKEN: ${{ secrets.GITHUB_TOKEN }}
7980
run: |
8081
git fetch origin
8182
git checkout ${{ github.ref_name }} || git checkout -b ${{ github.ref_name }} origin/${{ github.ref_name }}
82-
git add "*.md" metrics.json
83+
git pull origin ${{ github.ref_name }} || echo "No merge needed"
84+
git add "*.md" || true
85+
[ -f metrics.json ] && git add metrics.json || true
8386
git commit -m "Update visitor count" || echo "No changes to commit"
8487
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
85-
git pull --rebase origin ${{ github.ref_name }} || echo "No rebase needed"
8688
git push origin HEAD:${{ github.ref_name }}
87-
88-
- name: Create Pull Request (non-PR)
89-
if: github.event_name != 'pull_request'
90-
uses: peter-evans/create-pull-request@v6
91-
with:
92-
token: ${{ secrets.GITHUB_TOKEN }}
93-
branch: update-visitor-count
94-
title: "Update visitor count"
95-
body: "Automated update of visitor count"
96-
base: main

0_Azure/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Costa Rica
55
[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/)
66
[brown9804](https://github.com/brown9804)
77

8-
Last updated: 2025-04-08
8+
Last updated: 2025-07-17
99

1010
------------------------------------------
1111

@@ -126,7 +126,9 @@ Last updated: 2025-04-08
126126
<img width="800" alt="image" src="https://github.com/brown9804/MSCloudEssentials_LPath/assets/24630902/cf68fbc7-20e7-4e62-8202-393584f058e9">
127127

128128

129+
<!-- START BADGE -->
129130
<div align="center">
130-
<h3 style="color: #4CAF50;">Total Visitors</h3>
131-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
131+
<img src="https://img.shields.io/badge/Total%20views-230-limegreen" alt="Total views">
132+
<p>Refresh Date: 2025-07-17</p>
132133
</div>
134+
<!-- END BADGE -->

1_MS365/Excel/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Last updated: 2025-07-17
3030

3131
<!-- START BADGE -->
3232
<div align="center">
33-
<img src="https://img.shields.io/badge/Total%20views-9-limegreen" alt="Total views">
34-
<p>Refresh Date: 2025-07-16</p>
33+
<img src="https://img.shields.io/badge/Total%20views-230-limegreen" alt="Total views">
34+
<p>Refresh Date: 2025-07-17</p>
3535
</div>
3636
<!-- END BADGE -->

1_MS365/Forms/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Last updated: 2025-07-17
2929

3030
<!-- START BADGE -->
3131
<div align="center">
32-
<img src="https://img.shields.io/badge/Total%20views-9-limegreen" alt="Total views">
33-
<p>Refresh Date: 2025-07-16</p>
32+
<img src="https://img.shields.io/badge/Total%20views-230-limegreen" alt="Total views">
33+
<p>Refresh Date: 2025-07-17</p>
3434
</div>
3535
<!-- END BADGE -->

1_MS365/Planner/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Last updated: 2025-07-17
3131

3232
<!-- START BADGE -->
3333
<div align="center">
34-
<img src="https://img.shields.io/badge/Total%20views-9-limegreen" alt="Total views">
35-
<p>Refresh Date: 2025-07-16</p>
34+
<img src="https://img.shields.io/badge/Total%20views-230-limegreen" alt="Total views">
35+
<p>Refresh Date: 2025-07-17</p>
3636
</div>
3737
<!-- END BADGE -->

1_MS365/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Last updated: 2025-07-17
5151

5252
<!-- START BADGE -->
5353
<div align="center">
54-
<img src="https://img.shields.io/badge/Total%20views-9-limegreen" alt="Total views">
55-
<p>Refresh Date: 2025-07-16</p>
54+
<img src="https://img.shields.io/badge/Total%20views-230-limegreen" alt="Total views">
55+
<p>Refresh Date: 2025-07-17</p>
5656
</div>
5757
<!-- END BADGE -->

1_MS365/SharePoint/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Last updated: 2025-07-17
3333

3434
<!-- START BADGE -->
3535
<div align="center">
36-
<img src="https://img.shields.io/badge/Total%20views-9-limegreen" alt="Total views">
37-
<p>Refresh Date: 2025-07-16</p>
36+
<img src="https://img.shields.io/badge/Total%20views-230-limegreen" alt="Total views">
37+
<p>Refresh Date: 2025-07-17</p>
3838
</div>
3939
<!-- END BADGE -->
4040

2_Dynamics365/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Last updated: 2025-07-17
3131

3232
<!-- START BADGE -->
3333
<div align="center">
34-
<img src="https://img.shields.io/badge/Total%20views-9-limegreen" alt="Total views">
35-
<p>Refresh Date: 2025-07-16</p>
34+
<img src="https://img.shields.io/badge/Total%20views-230-limegreen" alt="Total views">
35+
<p>Refresh Date: 2025-07-17</p>
3636
</div>
3737
<!-- END BADGE -->

3_PowerPlatform/0_PowerApps/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ formatDateTime(utcNow(), 'MM-dd-yyyy')
3838

3939
<!-- START BADGE -->
4040
<div align="center">
41-
<img src="https://img.shields.io/badge/Total%20views-9-limegreen" alt="Total views">
42-
<p>Refresh Date: 2025-07-16</p>
41+
<img src="https://img.shields.io/badge/Total%20views-230-limegreen" alt="Total views">
42+
<p>Refresh Date: 2025-07-17</p>
4343
</div>
4444
<!-- END BADGE -->

0 commit comments

Comments
 (0)