Skip to content

Commit 89d478f

Browse files
authored
Merge pull request #13 from MicrosoftCloudEssentials-LearningHub/upgrade-pipelines-counter-logic
Upgrade pipelines counter logic
2 parents f063320 + d4667c9 commit 89d478f

14 files changed

Lines changed: 196 additions & 37 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
pull-requests: write
1011

1112
jobs:
1213
update-date:
@@ -35,7 +36,12 @@ jobs:
3536
run: python .github/workflows/update_date.py
3637

3738
- name: Commit changes
39+
env:
40+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
3841
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"
3944
git add -A
4045
git commit -m "Update last modified date in Markdown files" || echo "No changes to commit"
46+
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
4147
git push origin HEAD:${{ github.event.pull_request.head.ref }}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Use Visitor Counter Logic
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '0 0 * * *' # Runs daily at midnight
9+
workflow_dispatch: # Allows manual triggering
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
jobs:
16+
update-visitor-count:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout current repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Shallow clone visitor counter logic
26+
run: git clone --depth=1 https://github.com/brown9804/github-visitor-counter.git
27+
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
33+
- name: Install dependencies for github-visitor-counter
34+
run: |
35+
cd github-visitor-counter
36+
npm ci
37+
38+
- name: Run visitor counter logic (updates markdown badges and metrics.json)
39+
run: node github-visitor-counter/update_repo_views_counter.js
40+
env:
41+
TRAFFIC_TOKEN: ${{ secrets.TRAFFIC_TOKEN }}
42+
REPO: ${{ github.repository }}
43+
44+
- name: Move generated metrics.json to root
45+
run: mv github-visitor-counter/metrics.json .
46+
47+
- name: List files for debugging
48+
run: |
49+
ls -l
50+
ls -l github-visitor-counter
51+
52+
- name: Clean up visitor counter logic
53+
run: rm -rf github-visitor-counter
54+
55+
- name: Configure Git author
56+
run: |
57+
git config --global user.name "github-actions[bot]"
58+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
59+
60+
- name: Commit and push changes (PR)
61+
if: github.event_name == 'pull_request'
62+
env:
63+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
run: |
65+
git fetch origin
66+
git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
67+
git add "*.md" metrics.json
68+
git commit -m "Update visitor count" || echo "No changes to commit"
69+
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
70+
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
71+
git push origin HEAD:${{ github.event.pull_request.head.ref }}
72+
73+
- name: Commit and push changes (non-PR)
74+
if: github.event_name != 'pull_request'
75+
env:
76+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
run: |
78+
git fetch origin
79+
git checkout ${{ github.event.pull_request.head.ref }} || git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
80+
git add "*.md" metrics.json
81+
git commit -m "Update visitor count" || echo "No changes to commit"
82+
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
83+
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
84+
git push origin HEAD:${{ github.event.pull_request.head.ref }}
85+
86+
- name: Create Pull Request (non-PR)
87+
if: github.event_name != 'pull_request'
88+
uses: peter-evans/create-pull-request@v6
89+
with:
90+
token: ${{ secrets.GITHUB_TOKEN }}
91+
branch: update-visitor-count
92+
title: "Update visitor count"
93+
body: "Automated update of visitor count"
94+
base: main

0_Overview.md

Lines changed: 5 additions & 6 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-01-29
8+
Last updated: 2025-07-16
99

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

@@ -102,10 +102,9 @@ Click here for more information about: [Z-Order & V-Order](https://github.com/Mi
102102

103103
Click here for more information about: [Shortcuts & Mirroring](https://github.com/MicrosoftCloudEssentials-LearningHub/Demos-ScenariosHub/blob/main/0_Azure/2_AzureAnalytics/0_Fabric/demos/17_Overview.md#shortcuts--mirroring)
104104

105-
106-
107-
105+
<!-- START BADGE -->
108106
<div align="center">
109-
<h3 style="color: #4CAF50;">Total Visitors</h3>
110-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
107+
<img src="https://img.shields.io/badge/Total%20views-522-limegreen" alt="Total views">
108+
<p>Refresh Date: 2025-07-16</p>
111109
</div>
110+
<!-- END BADGE -->

AzurePortal/1_MedallionArch/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-02-21
8+
Last updated: 2025-07-16
99

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

@@ -297,7 +297,9 @@ https://github.com/user-attachments/assets/2a64762a-f120-4448-b0fb-7a49f4d1bedb
297297

298298
<img width="550" alt="image" src="https://github.com/user-attachments/assets/01cb521f-8529-4097-95bf-7c30a92fefd2">
299299

300+
<!-- START BADGE -->
300301
<div align="center">
301-
<h3 style="color: #4CAF50;">Total Visitors</h3>
302-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
302+
<img src="https://img.shields.io/badge/Total%20views-522-limegreen" alt="Total views">
303+
<p>Refresh Date: 2025-07-16</p>
303304
</div>
305+
<!-- END BADGE -->

AzurePortal/1_MedallionArch/docs/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ 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-01-29
8+
Last updated: 2025-07-16
99

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

1212
> You can use the [drawio template](./FabricMedallionArch.drawio) as guidance to create your solution diagram.
1313
1414
<img width="750" alt="image" src="https://github.com/user-attachments/assets/0630fb8c-29a5-499c-bfa9-f252af7debbc">
15+
16+
<!-- START BADGE -->
17+
<div align="center">
18+
<img src="https://img.shields.io/badge/Total%20views-522-limegreen" alt="Total views">
19+
<p>Refresh Date: 2025-07-16</p>
20+
</div>
21+
<!-- END BADGE -->

AzurePortal/2_AI_LLMs/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-03-13
8+
Last updated: 2025-07-16
99

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

@@ -395,7 +395,9 @@ Make sure to replace `"your_openai_api_key"`, `"https://your_openai_api_base/"`,
395395
pprint(dict(rm), indent=4)
396396
```
397397
398+
<!-- START BADGE -->
398399
<div align="center">
399-
<h3 style="color: #4CAF50;">Total Visitors</h3>
400-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
400+
<img src="https://img.shields.io/badge/Total%20views-522-limegreen" alt="Total views">
401+
<p>Refresh Date: 2025-07-16</p>
401402
</div>
403+
<!-- END BADGE -->

AzurePortal/3_AISkills.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-03-13
8+
Last updated: 2025-07-16
99

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

@@ -97,7 +97,9 @@ Key Features:
9797
| Can you highlight any correlations between variables? | <img width="500" alt="image" src="https://github.com/user-attachments/assets/a9442f38-ade1-45ee-9cb6-4adf8bdbf0f7"> |
9898
| What are the outliers in this dataset? | <img width="500" alt="image" src="https://github.com/user-attachments/assets/1c0d07b2-91fe-4335-9760-886c10e77bb9"> |
9999

100+
<!-- START BADGE -->
100101
<div align="center">
101-
<h3 style="color: #4CAF50;">Total Visitors</h3>
102-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
102+
<img src="https://img.shields.io/badge/Total%20views-522-limegreen" alt="Total views">
103+
<p>Refresh Date: 2025-07-16</p>
103104
</div>
105+
<!-- END BADGE -->

AzurePortal/4_CICD/0_deployment-pipelines/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-01-29
8+
Last updated: 2025-07-16
99

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

@@ -194,7 +194,9 @@ Steps to Set Up Incremental Refresh:
194194
3. **Enable Incremental Refresh**: Right-click the query and select Incremental Refresh. Configure the settings, such as the DateTime column and the time range for data extraction.
195195
4. **Publish the Dataflow**: Once configured, publish the dataflow. The dataflow will then automatically refresh the data incrementally based on the settings.
196196

197+
<!-- START BADGE -->
197198
<div align="center">
198-
<h3 style="color: #4CAF50;">Total Visitors</h3>
199-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
199+
<img src="https://img.shields.io/badge/Total%20views-522-limegreen" alt="Total views">
200+
<p>Refresh Date: 2025-07-16</p>
200201
</div>
202+
<!-- END BADGE -->

AzurePortal/4_CICD/0_deployment-pipelines/samples/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ 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-01-29
8+
Last updated: 2025-07-16
99

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

1212
> In this folder, you'll find some sample files that we'll be using throughout the demo.
1313
> `These files will help us illustrate the process of creating a workspace, setting up a lakehouse, defining a dataset schema, generating reports with Copilot, creating a semantic model, and deploying through a pipeline`.
1414
15+
<!-- START BADGE -->
1516
<div align="center">
16-
<h3 style="color: #4CAF50;">Total Visitors</h3>
17-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
17+
<img src="https://img.shields.io/badge/Total%20views-522-limegreen" alt="Total views">
18+
<p>Refresh Date: 2025-07-16</p>
1819
</div>
20+
<!-- END BADGE -->

AzurePortal/4_CICD/1_github-integration.md

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

9-
Last updated: 2025-02-21
9+
Last updated: 2025-07-16
1010

1111
----------
1212

@@ -62,7 +62,9 @@ https://github.com/user-attachments/assets/64f099a1-b749-47a6-b723-fa1cb5c575a3
6262

6363
> Click here to read more about [considerations and limitations](https://learn.microsoft.com/en-us/fabric/cicd/git-integration/git-get-started?tabs=azure-devops%2CAzure%2Ccommit-to-git#considerations-and-limitations).
6464
65-
<div align="center">
66-
<h3 style="color: #4CAF50;">Total Visitors</h3>
67-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
65+
<!-- START BADGE -->
66+
<div align="center">
67+
<img src="https://img.shields.io/badge/Total%20views-522-limegreen" alt="Total views">
68+
<p>Refresh Date: 2025-07-16</p>
6869
</div>
70+
<!-- END BADGE -->

0 commit comments

Comments
 (0)