Skip to content

Commit a33ad57

Browse files
authored
Merge pull request #24 from MicrosoftCloudEssentials-LearningHub/changing-counter
changing counter type + cleaning format
2 parents 356615d + f149c67 commit a33ad57

37 files changed

+286
-83
lines changed
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

Cost-Management/BillingReport.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ Last updated: 2025-05-02
105105

106106
<img width="550" alt="image" src="https://github.com/user-attachments/assets/f677d4b9-882e-4893-9624-a0cad7624d73">
107107

108+
<!-- START BADGE -->
108109
<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;"/>
110+
<img src="https://img.shields.io/badge/Total%20views-63-limegreen" alt="Total views">
111+
<p>Refresh Date: 2025-07-17</p>
111112
</div>
113+
<!-- END BADGE -->

Cost-Management/BudgetAlerts.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ Last updated: 2025-05-02
6363
- Review cost-saving recommendations provided by Azure.
6464
- Implement suggested optimizations to reduce unnecessary spending.
6565

66+
<!-- START BADGE -->
6667
<div align="center">
67-
<h3 style="color: #4CAF50;">Total Visitors</h3>
68-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
68+
<img src="https://img.shields.io/badge/Total%20views-63-limegreen" alt="Total views">
69+
<p>Refresh Date: 2025-07-17</p>
6970
</div>
71+
<!-- END BADGE -->

Cost-Management/PricingOverview.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Last updated: 2025-03-21
1313
<details>
1414
<summary><b>List of References </b> (Click to expand)</summary>
1515

16-
- [Fabric operations](https://learn.microsoft.com/en-us/fabric/enterprise/fabric-operations)
17-
- [Microsoft Fabric pricing](https://azure.microsoft.com/en-us/pricing/details/microsoft-fabric/?cdn=disable)
18-
- [Microsoft Fabric Monitoring Usage - Overview](https://github.com/MicrosoftCloudEssentials-LearningHub/Fabric-EnterpriseFramework/blob/main/Monitoring-Observability/MonitorUsage.md)
19-
- [Steps to Configure Capacity Alerts - Overview](https://github.com/MicrosoftCloudEssentials-LearningHub/Fabric-EnterpriseFramework/blob/main/Monitoring-Observability/StepsCapacityAlert.md)
16+
- [Fabric operations](https://learn.microsoft.com/en-us/fabric/enterprise/fabric-operations)
17+
- [Microsoft Fabric pricing](https://azure.microsoft.com/en-us/pricing/details/microsoft-fabric/?cdn=disable)
18+
- [Microsoft Fabric Monitoring Usage - Overview](https://github.com/MicrosoftCloudEssentials-LearningHub/Fabric-EnterpriseFramework/blob/main/Monitoring-Observability/MonitorUsage.md)
19+
- [Steps to Configure Capacity Alerts - Overview](https://github.com/MicrosoftCloudEssentials-LearningHub/Fabric-EnterpriseFramework/blob/main/Monitoring-Observability/StepsCapacityAlert.md)
2020

2121
</details>
2222

@@ -25,11 +25,11 @@ Last updated: 2025-03-21
2525

2626
- [Overview](#overview)
2727
- [Reservations & Capacity](#reservations--capacity)
28-
- [Scope Assignment in Reservations](#scope-assignment-in-reservations)
28+
- [Scope Assignment in Reservations](#scope-assignment-in-reservations)
2929
- [Additional Costs](#additional-costs)
3030
- [E.g F64](#eg-f64)
31-
- [Included in F64 Reserved Capacity](#included-in-f64-reserved-capacity)
32-
- [What’s NOT Included in the Flat Rate](#whats-not-included-in-the-flat-rate)
31+
- [Included in F64 Reserved Capacity](#included-in-f64-reserved-capacity)
32+
- [What’s NOT Included in the Flat Rate](#whats-not-included-in-the-flat-rate)
3333

3434
</details>
3535

@@ -50,9 +50,10 @@ Last updated: 2025-03-21
5050
> The included storage in Microsoft Fabric primarily applies to **mirroring** across all F SKUs. This means that the free storage provided (e.g., 64 TB for F64) is specifically allocated for creating mirrored copies of your data to ensure redundancy and high availability. <br/> <br/>
5151
> For other types of storage, such as general data storage or storage used by Data Factory and AI capabilities, you will be billed if you exceed the included storage or if compute capacity is paused.This applies to all F SKUs, from F2 to F2048.
5252
53-
https://github.com/user-attachments/assets/83447901-2227-4cf3-a89c-c8ee57d50009
53+
<https://github.com/user-attachments/assets/83447901-2227-4cf3-a89c-c8ee57d50009>
5454

5555
> Considerations:
56+
5657
- **Region and SKU Size**: The price of Microsoft Fabric services varies based on the region and the SKU size. For instance, the cost in North America is different from that in Europe. Additionally, different SKUs have specific rates. For example, an F256 SKU has a different rate compared to an F128 SKU.
5758
- **What is an SKU?**: SKU stands for **Stock Keeping Unit**. It's a unique identifier for each distinct product and service that can be purchased. In the context of Microsoft Fabric, SKUs represent different capacities or configurations of the service. For example, an F256 SKU indicates a specific capacity of 256 Compute Units (CU).
5859
- **What is a CU?**: CU stands for **Compute Unit**. It's a measure of the computing resources allocated to your service. Higher CU values indicate more computing power and capacity. For instance, an F256 SKU provides 256 CUs, which can handle more intensive workloads compared to an F128 SKU with 128 CUs.
@@ -62,6 +63,7 @@ https://github.com/user-attachments/assets/83447901-2227-4cf3-a89c-c8ee57d50009
6263
This flexibility allows you to optimize your Microsoft Fabric costs based on your specific requirements and usage patterns. Being clear about the sizes and regions helps ensure you get the best value for your reservation.
6364

6465
> [!NOTE]
66+
>
6567
> - `Capacity Units (CU)`: Measure of compute power within a SKU. Higher CUs provide more computational capacity. <br/>
6668
> - `Power BI SKU`: Different SKUs (A, EM, P, F) cater to various needs from individual users to large enterprises. <br/>
6769
> - `Power BI v-cores`: Virtual cores dedicated to Power BI operations, ensuring consistent performance. <br/>
@@ -94,6 +96,7 @@ This flexibility allows you to optimize your Microsoft Fabric costs based on you
9496

9597
> Microsoft Fabric `Reservations are agreements` for a specific time period and compute capacity. Whether using the Pay-as-you-go model or reservations, you need to create the Microsoft Fabric Capacity within a resource group. <br/> <br/>
9698
> Reservations in Azure, including Microsoft Fabric `reservations`, are `managed at the subscription level`. This means that the reserved capacity units (CUs) apply to the entire subscription, not to individual resource groups. <br/>
99+
>
97100
> - `Reservations`: Provide a `subscription-wide discount` for committing to a certain amount of capacity over a period of time. <br/>
98101
> - `Capacity Creation`: You create and manage Fabric `capacities within specific resource groups`, but the `cost benefits from the reservation apply at the subscription level`.
99102
@@ -144,7 +147,7 @@ This flexibility allows you to optimize your Microsoft Fabric costs based on you
144147
- If your workloads **exceed 64 CUs**, you’ll be billed **pay-as-you-go** for the overage.
145148
- **Storage and networking** costs (e.g., OneLake storage, data egress) are **not included** in the reservation
146149

147-
### Included in F64 Reserved Capacity
150+
### Included in F64 Reserved Capacity
148151

149152
> These services are covered **as long as they stay within the 64 CU limit**:
150153
@@ -163,7 +166,6 @@ This flexibility allows you to optimize your Microsoft Fabric costs based on you
163166

164167
> These are **billed separately** if they exceed the reserved CU pool or use **specialized compute**. These charges apply **only when usage exceeds the base F64 capacity or involves specialized compute paths**.
165168
166-
167169
| **Service/Workload** | **Why It’s Extra** |
168170
|----------------------|--------------------|
169171
| **Data Movement (e.g., Copy activity)** | Uses additional compute beyond base CU allocation. |
@@ -173,8 +175,9 @@ This flexibility allows you to optimize your Microsoft Fabric costs based on you
173175
| **Iterative Read/Write via Proxy** | Repeated access patterns through proxy connections are compute-intensive and billed separately. |
174176
| **Networking & Storage** | Not included in Fabric capacity; billed separately under Azure storage and data transfer pricing. |
175177

176-
178+
<!-- START BADGE -->
177179
<div align="center">
178-
<h3 style="color: #4CAF50;">Total Visitors</h3>
179-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
180+
<img src="https://img.shields.io/badge/Total%20views-63-limegreen" alt="Total views">
181+
<p>Refresh Date: 2025-07-17</p>
180182
</div>
183+
<!-- END BADGE -->

Deployment-Pipelines/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ Steps to Set Up Incremental Refresh:
196196
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.
197197
4. **Publish the Dataflow**: Once configured, publish the dataflow. The dataflow will then automatically refresh the data incrementally based on the settings.
198198

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

Deployment-Pipelines/samples/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Last updated: 2025-04-15
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-63-limegreen" alt="Total views">
18+
<p>Refresh Date: 2025-07-17</p>
1819
</div>
20+
<!-- END BADGE -->

Deployment-Pipelines/samples/data/readme.md

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

GitHub-Integration.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ Last updated: 2025-04-21
6060

6161
> 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).
6262
63-
<div align="center">
64-
<h3 style="color: #4CAF50;">Total Visitors</h3>
65-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
63+
<!-- START BADGE -->
64+
<div align="center">
65+
<img src="https://img.shields.io/badge/Total%20views-63-limegreen" alt="Total views">
66+
<p>Refresh Date: 2025-07-17</p>
6667
</div>
68+
<!-- END BADGE -->

Monitoring-Observability/MonitorUsage.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ Steps to Access Microsoft Purview via Audit Logs:
288288

289289
<img width="550" alt="image" src="https://github.com/user-attachments/assets/90730142-2a56-43af-a6e5-6c3aa5deddff">
290290

291+
<!-- START BADGE -->
291292
<div align="center">
292-
<h3 style="color: #4CAF50;">Total Visitors</h3>
293-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
293+
<img src="https://img.shields.io/badge/Total%20views-63-limegreen" alt="Total views">
294+
<p>Refresh Date: 2025-07-17</p>
294295
</div>
296+
<!-- END BADGE -->

Monitoring-Observability/StepsCapacityAlert.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ Last updated: 2025-04-21
4747
4848
<img width="700" alt="image" src="https://github.com/user-attachments/assets/308e372d-48de-46f4-9138-984e15b5fd24">
4949

50+
<!-- START BADGE -->
5051
<div align="center">
51-
<h3 style="color: #4CAF50;">Total Visitors</h3>
52-
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
52+
<img src="https://img.shields.io/badge/Total%20views-63-limegreen" alt="Total views">
53+
<p>Refresh Date: 2025-07-17</p>
5354
</div>
55+
<!-- END BADGE -->

0 commit comments

Comments
 (0)