diff --git a/.github/workflows/use-visitor-counter.yml b/.github/workflows/use-visitor-counter.yml index 6a10694..72ed160 100644 --- a/.github/workflows/use-visitor-counter.yml +++ b/.github/workflows/use-visitor-counter.yml @@ -66,15 +66,34 @@ jobs: GIT_COMMITTER_NAME: github-actions[bot] GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com run: | + set -euo pipefail + # Ensure we're on the correct branch git switch -c "$PR_BRANCH" || git switch "$PR_BRANCH" - - # Stage and commit changes if any + + # Rebase onto the latest remote branch state before creating a commit. + git fetch origin "$PR_BRANCH" + git rebase "origin/$PR_BRANCH" + + # Stage and commit changes if any. git add -A - git diff --staged --quiet || git commit -m "Update visitor count" - - # Pull and merge existing changes - git pull origin "$PR_BRANCH" --no-rebase - - # Push all changes - git push origin "$PR_BRANCH" + if git diff --staged --quiet; then + echo "No changes to commit" + exit 0 + fi + + git commit -m "Update visitor count" + + # Retry the push after rebasing if another update lands first. + for attempt in 1 2 3; do + if git push origin HEAD:"$PR_BRANCH"; then + exit 0 + fi + + echo "Push rejected on attempt $attempt; fetching and rebasing" + git fetch origin "$PR_BRANCH" + git rebase "origin/$PR_BRANCH" + done + + echo "Failed to push visitor count updates after 3 attempts" + exit 1 diff --git a/BestPractices.md b/BestPractices.md index 4000d6e..ff1568d 100644 --- a/BestPractices.md +++ b/BestPractices.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2025-08-04 @@ -96,8 +96,8 @@ Last updated: 2025-08-04
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/LICENSE b/LICENSE index dbdf3d4..3417b91 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 Microsoft Cloud Sandbox - Unofficial +Copyright (c) 2025 Cloud2BR Open Source Microsoft Cloud Sandbox - Learning Hub Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 7489b5b..3e3fb50 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-03-10 @@ -482,8 +482,8 @@ gh codespace stop
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/0_GitHub_AI_models.md b/demos/0_GitHub_AI_models.md index 6fc5928..75973cd 100644 --- a/demos/0_GitHub_AI_models.md +++ b/demos/0_GitHub_AI_models.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2025-08-04 @@ -194,8 +194,8 @@ Last updated: 2025-08-04
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/1_GitHubPagesOverview/README.md b/demos/1_GitHubPagesOverview/README.md index 7abe493..2fc893b 100644 --- a/demos/1_GitHubPagesOverview/README.md +++ b/demos/1_GitHubPagesOverview/README.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-03-26 @@ -15,7 +15,7 @@ Last updated: 2026-03-26 - [Websites for you and your projects](https://pages.github.com/) - [Essentials of automated application deployment with GitHub Actions and GitHub Pages](https://resources.github.com/learn/pathways/automation/essentials/automated-application-deployment-with-github-actions-and-pages/) -- [Microsoft Cloud Sandbox - Unofficial](https://microsoftcloudessentials-learninghub.github.io/org-catalog/) One example was a catalog that aggregated multiple repositories from my GitHub organization. The idea behind it was to create a user‑friendly page that listed all repositories hosted within the organization, while also allowing them to be filtered based on GitHub metadata by [Org Catalog (GitHub Pages)](https://github.com/MicrosoftCloudEssentials-LearningHub/org-catalog) +- [Cloud2BR Open Source Microsoft Cloud Sandbox - Learning Hub](https://cloud2br-msftlearninghub.github.io/org-catalog/) One example was a catalog that aggregated multiple repositories from my GitHub organization. The idea behind it was to create a user-friendly page that listed all repositories hosted within the organization, while also allowing them to be filtered based on GitHub metadata by [Org Catalog (GitHub Pages)](https://github.com/Cloud2BR-MSFTLearningHub/org-catalog) - [TechWorkshop L300: Win the database acceleration](https://microsoft.github.io/TechExcel-Win-the-Database-Platform/) Example of Workshops documented using GitHub Pages @@ -84,7 +84,7 @@ Last updated: 2026-03-26
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/2_GitHub_Copilot_Licenses.md b/demos/2_GitHub_Copilot_Licenses.md index 6b9beeb..12786dc 100644 --- a/demos/2_GitHub_Copilot_Licenses.md +++ b/demos/2_GitHub_Copilot_Licenses.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2025-10-07 @@ -169,7 +169,7 @@ https://github.com/user-attachments/assets/3c993648-8a8d-4b5d-be79-19850aeef593
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/3_GH_cmds_Overview.md b/demos/3_GH_cmds_Overview.md index 31c89c4..36a2fc4 100644 --- a/demos/3_GH_cmds_Overview.md +++ b/demos/3_GH_cmds_Overview.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-01-20 @@ -66,7 +66,7 @@ Last updated: 2026-01-20
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/4_GitLab_migration_GH.md b/demos/4_GitLab_migration_GH.md index 6f0788d..f59dd51 100644 --- a/demos/4_GitLab_migration_GH.md +++ b/demos/4_GitLab_migration_GH.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-01-25 @@ -114,7 +114,7 @@ https://github.com/user-attachments/assets/fffbbce1-8a48-49f7-a8d8-96da6d9c433e
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/5_GH_ADO_Defender_art_Overview.md b/demos/5_GH_ADO_Defender_art_Overview.md index b892177..3843fe1 100644 --- a/demos/5_GH_ADO_Defender_art_Overview.md +++ b/demos/5_GH_ADO_Defender_art_Overview.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-03-13 @@ -246,7 +246,7 @@ flowchart LR
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/6_AppDev_GH_Pricing.md b/demos/6_AppDev_GH_Pricing.md index 739497b..cc1843e 100644 --- a/demos/6_AppDev_GH_Pricing.md +++ b/demos/6_AppDev_GH_Pricing.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-01-25 @@ -210,7 +210,7 @@ https://github.com/user-attachments/assets/de20f063-d70a-42d0-bb64-dd6acef85c59
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/7_DevSecOps_Demo/RBACs_Access_CICD_Pipelines.md b/demos/7_DevSecOps_Demo/RBACs_Access_CICD_Pipelines.md index 95740b1..3617f89 100644 --- a/demos/7_DevSecOps_Demo/RBACs_Access_CICD_Pipelines.md +++ b/demos/7_DevSecOps_Demo/RBACs_Access_CICD_Pipelines.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-01-25 @@ -56,7 +56,7 @@ From [End-to-end governance in Azure when using CI/CD](https://learn.microsoft.c
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/7_DevSecOps_Demo/README.md b/demos/7_DevSecOps_Demo/README.md index decb3b0..d81b5bd 100644 --- a/demos/7_DevSecOps_Demo/README.md +++ b/demos/7_DevSecOps_Demo/README.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-01-25 @@ -386,7 +386,7 @@ https://github.com/user-attachments/assets/773adf4c-9ab4-429e-9c13-f6f8a06a4c2b
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06

diff --git a/demos/8_ADO_Defender.md b/demos/8_ADO_Defender.md index d7d7dd8..68c5883 100644 --- a/demos/8_ADO_Defender.md +++ b/demos/8_ADO_Defender.md @@ -2,7 +2,7 @@ Costa Rica -[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [Cloud2BR OSS - Learning Hub](https://github.com/Cloud2BR-MSFTLearningHub) Last updated: 2026-03-19 @@ -145,8 +145,8 @@ It’s especially strong when paired with:
- Total views -

Refresh Date: 2026-03-26

+ Total views +

Refresh Date: 2026-04-06