From 16aa2571c73b0e7104ef3a396e5b96e1f92be1fa Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 6 Apr 2024 15:12:58 +0700 Subject: [PATCH 1/4] AWS: add FAQs to json --- services.json | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/services.json b/services.json index 0976524..b738e33 100644 --- a/services.json +++ b/services.json @@ -4,55 +4,64 @@ "service_name": "AWS S3", "service_url": "https://docs.aws.amazon.com/s3", "service_youtube_url": "https://youtu.be/77lMCiiMilo", - "service_short_name": "s3" + "service_short_name": "s3", + "faq_url": "https://aws.amazon.com/s3/faqs/" }, { "service_name": "AWS Pinpoint", "service_url": "https://aws.amazon.com/pinpoint/", "service_youtube_url": "https://youtu.be/qJF1pErxqKQ", - "service_short_name": "pinpoint" + "service_short_name": "pinpoint", + "faq_url": "https://aws.amazon.com/pinpoint/faqs/" }, { "service_name": "AWS Appflow", "service_url": "https://docs.aws.amazon.com/appflow/index.html", "service_youtube_url": "https://youtu.be/6NSxo5syl40", - "service_short_name": "appflow" + "service_short_name": "appflow", + "faq_url": "https://aws.amazon.com/appflow/faqs/" }, { "service_name": "AWS Kinesis", "service_url": "https://docs.aws.amazon.com/kinesis/index.html", "service_youtube_url": "https://youtu.be/MbEfiX4sMXc", - "service_short_name": "kinesis" + "service_short_name": "kinesis", + "faq_url": "https://aws.amazon.com/kinesis/faqs/" }, { "service_name": "AWS EC2", "service_url": "https://docs.aws.amazon.com/ec2/", "service_youtube_url": "https://youtu.be/TsRBftzZsQo", - "service_short_name": "ec2" + "service_short_name": "ec2", + "faq_url": "https://aws.amazon.com/ec2/faqs/" }, { "service_name": "AWS CloudWatch", "service_url": "https://docs.aws.amazon.com/cloudwatch/", "service_youtube_url": "https://youtu.be/a4dhoTQCyRA", - "service_short_name": "cloudwatch" + "service_short_name": "cloudwatch", + "faq_url": "https://aws.amazon.com/cloudwatch/faqs/" }, { "service_name": "AWS RDS", "service_url": "https://docs.aws.amazon.com/rds", "service_youtube_url": "https://youtu.be/a4dhoTQCyRA", - "service_short_name": "rds" + "service_short_name": "rds", + "faq_url": "https://aws.amazon.com/rds/faqs/" }, { "service_name": "AWS ControlTower ", "service_url": "https://docs.aws.amazon.com/controltower", "service_youtube_url": "https://youtu.be/eOBq__h4OJ4", - "service_short_name": "controltower" + "service_short_name": "controltower", + "faq_url": "https://aws.amazon.com/controltower/faqs/" }, { "service_name": "AWS Route53", "service_url": "https://docs.aws.amazon.com/route53", "service_youtube_url": "https://youtu.be/RGWgfhZByAI", - "service_short_name": "route53" + "service_short_name": "route53", + "faq_url": "https://aws.amazon.com/route53/faqs/" }, { "service_name": "AWS Cloudfront", @@ -61,46 +70,53 @@ "service_short_name": "cloudfront" }, { - "service_name": "AWS Lamda", + "service_name": "AWS Lambda", "service_url": "https://docs.aws.amazon.com/lambda/index.html", "service_youtube_url": "https://youtu.be/eOBq__h4OJ4", - "service_short_name": "lamda" + "service_short_name": "lambda", + "faq_url": "https://aws.amazon.com/lambda/faqs/" }, { "service_name": "AWS KMS", "service_url": "https://docs.aws.amazon.com/kms", "service_youtube_url": "https://youtu.be/8Z0wsE2HoSo", - "service_short_name": "kms" + "service_short_name": "kms", + "faq_url": "https://aws.amazon.com/kms/faqs/" }, { "service_name": "AWS ACM", "service_url": "https://docs.aws.amazon.com/acm", "service_youtube_url": "https://youtu.be/Nk77te-cksQ", - "service_short_name": "acm" + "service_short_name": "acm", + "faq_url": "https://aws.amazon.com/certificate-manager/faqs/" }, { "service_name": "AWS Outposts", "service_url": "https://docs.aws.amazon.com/outposts/index.html", "service_youtube_url": "https://youtu.be/ppG2FFB0mMQ", - "service_short_name": "outposts" + "service_short_name": "outposts", + "faq_url": "https://aws.amazon.com/outposts/faqs/" }, { "service_name": "AWS CodeCommit", "service_url": "https://docs.aws.amazon.com/codecommit", "service_youtube_url": "https://youtu.be/46PRLMW8otg", - "service_short_name": "codecommit" + "service_short_name": "codecommit", + "faq_url": "https://aws.amazon.com/codecommit/faqs/" }, { "service_name": "AWS ECS", "service_url": "https://docs.aws.amazon.com/ecs/", "service_youtube_url": "https://youtu.be/FnFvpIsBrog", - "service_short_name": "ecs" + "service_short_name": "ecs", + "faq_url": "https://aws.amazon.com/ecs/faqs/" }, { "service_name": "AWS EKS", "service_url": "https://docs.aws.amazon.com/eks/", "service_youtube_url": "https://youtu.be/E956xeOt050", - "service_short_name": "eks" + "service_short_name": "eks", + "faq_url": "https://aws.amazon.com/eks/faqs/" } ] } From 8aaa0b5374f3061d33652cf11b6f74f853adea96 Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 6 Apr 2024 15:18:12 +0700 Subject: [PATCH 2/4] AWS: Add FAQ column to table --- README.md | 38 +++++++++++++++++++------------------- generate-content.sh | 7 ++++--- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 5a5290d..ec7b71b 100644 --- a/README.md +++ b/README.md @@ -26,24 +26,24 @@ ## AWS Services Learning Resources 📘 Below you will find links to detailed documentation and introductory videos for some popular AWS services -| ID | Service Name | AWS Docs | Youtube Introduction | -|----|--------------|----------|---------------------| -| 1 | AWS ACM | 📖 [acm](https://docs.aws.amazon.com/acm) | ▶️ [youtu.be/Nk77te-cksQ](https://youtu.be/Nk77te-cksQ) | -| 2 | AWS Appflow | 📖 [appflow](https://docs.aws.amazon.com/appflow/index.html) | ▶️ [youtu.be/6NSxo5syl40](https://youtu.be/6NSxo5syl40) | -| 3 | AWS CloudWatch | 📖 [cloudwatch](https://docs.aws.amazon.com/cloudwatch/) | ▶️ [youtu.be/a4dhoTQCyRA](https://youtu.be/a4dhoTQCyRA) | -| 4 | AWS Cloudfront | 📖 [cloudfront](https://docs.aws.amazon.com/cloudfront) | ▶️ [youtu.be/AT-nHW3_SVI](https://youtu.be/AT-nHW3_SVI) | -| 5 | AWS CodeCommit | 📖 [codecommit](https://docs.aws.amazon.com/codecommit) | ▶️ [youtu.be/46PRLMW8otg](https://youtu.be/46PRLMW8otg) | -| 6 | AWS ControlTower | 📖 [controltower](https://docs.aws.amazon.com/controltower) | ▶️ [youtu.be/eOBq__h4OJ4](https://youtu.be/eOBq__h4OJ4) | -| 7 | AWS EC2 | 📖 [ec2](https://docs.aws.amazon.com/ec2/) | ▶️ [youtu.be/TsRBftzZsQo](https://youtu.be/TsRBftzZsQo) | -| 8 | AWS ECS | 📖 [ecs](https://docs.aws.amazon.com/ecs/) | ▶️ [youtu.be/FnFvpIsBrog](https://youtu.be/FnFvpIsBrog) | -| 9 | AWS EKS | 📖 [eks](https://docs.aws.amazon.com/eks/) | ▶️ [youtu.be/E956xeOt050](https://youtu.be/E956xeOt050) | -| 10 | AWS KMS | 📖 [kms](https://docs.aws.amazon.com/kms) | ▶️ [youtu.be/8Z0wsE2HoSo](https://youtu.be/8Z0wsE2HoSo) | -| 11 | AWS Kinesis | 📖 [kinesis](https://docs.aws.amazon.com/kinesis/index.html) | ▶️ [youtu.be/MbEfiX4sMXc](https://youtu.be/MbEfiX4sMXc) | -| 12 | AWS Lamda | 📖 [lamda](https://docs.aws.amazon.com/lambda/index.html) | ▶️ [youtu.be/eOBq__h4OJ4](https://youtu.be/eOBq__h4OJ4) | -| 13 | AWS Outposts | 📖 [outposts](https://docs.aws.amazon.com/outposts/index.html) | ▶️ [youtu.be/ppG2FFB0mMQ](https://youtu.be/ppG2FFB0mMQ) | -| 14 | AWS Pinpoint | 📖 [pinpoint](https://aws.amazon.com/pinpoint/) | ▶️ [youtu.be/qJF1pErxqKQ](https://youtu.be/qJF1pErxqKQ) | -| 15 | AWS RDS | 📖 [rds](https://docs.aws.amazon.com/rds) | ▶️ [youtu.be/a4dhoTQCyRA](https://youtu.be/a4dhoTQCyRA) | -| 16 | AWS Route53 | 📖 [route53](https://docs.aws.amazon.com/route53) | ▶️ [youtu.be/RGWgfhZByAI](https://youtu.be/RGWgfhZByAI) | -| 17 | AWS S3 | 📖 [s3](https://docs.aws.amazon.com/s3) | ▶️ [youtu.be/77lMCiiMilo](https://youtu.be/77lMCiiMilo) | +| ID | Service Name | AWS Docs | Youtube Introduction | FAQ | +|----|--------------|----------|---------------------|-----| +| 1 | AWS ACM | 📖 [acm](https://docs.aws.amazon.com/acm) | ▶️ [youtu.be/Nk77te-cksQ](https://youtu.be/Nk77te-cksQ) | ❔ [acm/faqs](https://aws.amazon.com/certificate-manager/faqs/)| +| 2 | AWS Appflow | 📖 [appflow](https://docs.aws.amazon.com/appflow/index.html) | ▶️ [youtu.be/6NSxo5syl40](https://youtu.be/6NSxo5syl40) | ❔ [appflow/faqs](https://aws.amazon.com/appflow/faqs/)| +| 3 | AWS CloudWatch | 📖 [cloudwatch](https://docs.aws.amazon.com/cloudwatch/) | ▶️ [youtu.be/a4dhoTQCyRA](https://youtu.be/a4dhoTQCyRA) | ❔ [cloudwatch/faqs](https://aws.amazon.com/cloudwatch/faqs/)| +| 4 | AWS Cloudfront | 📖 [cloudfront](https://docs.aws.amazon.com/cloudfront) | ▶️ [youtu.be/AT-nHW3_SVI](https://youtu.be/AT-nHW3_SVI) | ❔ [cloudfront/faqs](null)| +| 5 | AWS CodeCommit | 📖 [codecommit](https://docs.aws.amazon.com/codecommit) | ▶️ [youtu.be/46PRLMW8otg](https://youtu.be/46PRLMW8otg) | ❔ [codecommit/faqs](https://aws.amazon.com/codecommit/faqs/)| +| 6 | AWS ControlTower | 📖 [controltower](https://docs.aws.amazon.com/controltower) | ▶️ [youtu.be/eOBq__h4OJ4](https://youtu.be/eOBq__h4OJ4) | ❔ [controltower/faqs](https://aws.amazon.com/controltower/faqs/)| +| 7 | AWS EC2 | 📖 [ec2](https://docs.aws.amazon.com/ec2/) | ▶️ [youtu.be/TsRBftzZsQo](https://youtu.be/TsRBftzZsQo) | ❔ [ec2/faqs](https://aws.amazon.com/ec2/faqs/)| +| 8 | AWS ECS | 📖 [ecs](https://docs.aws.amazon.com/ecs/) | ▶️ [youtu.be/FnFvpIsBrog](https://youtu.be/FnFvpIsBrog) | ❔ [ecs/faqs](https://aws.amazon.com/ecs/faqs/)| +| 9 | AWS EKS | 📖 [eks](https://docs.aws.amazon.com/eks/) | ▶️ [youtu.be/E956xeOt050](https://youtu.be/E956xeOt050) | ❔ [eks/faqs](https://aws.amazon.com/eks/faqs/)| +| 10 | AWS KMS | 📖 [kms](https://docs.aws.amazon.com/kms) | ▶️ [youtu.be/8Z0wsE2HoSo](https://youtu.be/8Z0wsE2HoSo) | ❔ [kms/faqs](https://aws.amazon.com/kms/faqs/)| +| 11 | AWS Kinesis | 📖 [kinesis](https://docs.aws.amazon.com/kinesis/index.html) | ▶️ [youtu.be/MbEfiX4sMXc](https://youtu.be/MbEfiX4sMXc) | ❔ [kinesis/faqs](https://aws.amazon.com/kinesis/faqs/)| +| 12 | AWS Lambda | 📖 [lambda](https://docs.aws.amazon.com/lambda/index.html) | ▶️ [youtu.be/eOBq__h4OJ4](https://youtu.be/eOBq__h4OJ4) | ❔ [lambda/faqs](https://aws.amazon.com/lambda/faqs/)| +| 13 | AWS Outposts | 📖 [outposts](https://docs.aws.amazon.com/outposts/index.html) | ▶️ [youtu.be/ppG2FFB0mMQ](https://youtu.be/ppG2FFB0mMQ) | ❔ [outposts/faqs](https://aws.amazon.com/outposts/faqs/)| +| 14 | AWS Pinpoint | 📖 [pinpoint](https://aws.amazon.com/pinpoint/) | ▶️ [youtu.be/qJF1pErxqKQ](https://youtu.be/qJF1pErxqKQ) | ❔ [pinpoint/faqs](https://aws.amazon.com/pinpoint/faqs/)| +| 15 | AWS RDS | 📖 [rds](https://docs.aws.amazon.com/rds) | ▶️ [youtu.be/a4dhoTQCyRA](https://youtu.be/a4dhoTQCyRA) | ❔ [rds/faqs](https://aws.amazon.com/rds/faqs/)| +| 16 | AWS Route53 | 📖 [route53](https://docs.aws.amazon.com/route53) | ▶️ [youtu.be/RGWgfhZByAI](https://youtu.be/RGWgfhZByAI) | ❔ [route53/faqs](https://aws.amazon.com/route53/faqs/)| +| 17 | AWS S3 | 📖 [s3](https://docs.aws.amazon.com/s3) | ▶️ [youtu.be/77lMCiiMilo](https://youtu.be/77lMCiiMilo) | ❔ [s3/faqs](https://aws.amazon.com/s3/faqs/)| And **more upcoming services content...⏩** you can star/follow this repository to get more up-to-dated content ⭐ diff --git a/generate-content.sh b/generate-content.sh index c130a5f..03db496 100755 --- a/generate-content.sh +++ b/generate-content.sh @@ -9,8 +9,8 @@ sed -i '/## AWS Services Learning Resources 📘/,$d' README.md # Add the table header echo "## AWS Services Learning Resources 📘" >>README.md echo "Below you will find links to detailed documentation and introductory videos for some popular AWS services" >>README.md -echo "| ID | Service Name | AWS Docs | Youtube Introduction |" >>README.md -echo "|----|--------------|----------|---------------------|" >>README.md +echo "| ID | Service Name | AWS Docs | Youtube Introduction | FAQ |" >>README.md +echo "|----|--------------|----------|---------------------|-----|" >>README.md # Initialize ID counter id=1 @@ -26,12 +26,13 @@ for service in $services; do url=$(_jq '.service_url') youtube_url=$(_jq '.service_youtube_url') service_name=$(_jq '.service_name') + faq_url=$(_jq '.faq_url') # Remove "https://" from YouTube URL and extract the video ID youtube_id=$(echo "$youtube_url" | sed 's~https://youtu.be/~~') # Update the service README.md content - echo "| $id | $service_name | 📖 [$service_short_name]($url) | ▶️ [youtu.be/$youtube_id](https://youtu.be/$youtube_id) |" >>README.md + echo "| $id | $service_name | 📖 [$service_short_name]($url) | ▶️ [youtu.be/$youtube_id](https://youtu.be/$youtube_id) | ❔ [$service_short_name/faqs]($faq_url)|" >>README.md # Increment ID ((id++)) From f984af63df91bb8d0d391fb566bca6ee6d54100f Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 6 Apr 2024 15:20:50 +0700 Subject: [PATCH 3/4] ci: Fix generate-content.sh: 38: id++: not found --- .github/workflows/generate-content.yml | 69 +++++++++++++------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/generate-content.yml b/.github/workflows/generate-content.yml index 012ec10..6a3f554 100755 --- a/.github/workflows/generate-content.yml +++ b/.github/workflows/generate-content.yml @@ -21,42 +21,41 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - - name: Install jq - run: sudo apt-get install jq -y + - name: Install jq + run: sudo apt-get install jq -y - - name: Generate Content - run: sh generate-content.sh + - name: Generate Content + run: bash generate-content.sh - - name: Commit changes - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git status - git add . - if git diff-index --quiet HEAD --; then - echo "No changes to commit" - else - git commit -m "[bot] Generate doc content for AWS services" --no-verify - fi + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git status + git add . + if git diff-index --quiet HEAD --; then + echo "No changes to commit" + else + git commit -m "[bot] Generate doc content for AWS services" --no-verify + fi - - name: Create pull request - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - id: cpr - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update document - committer: GitHub - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: false - branch: update-doc-patches - branch-suffix: random - delete-branch: true - title: '[bot] Generate doc content for AWS services' - body: | - Updated the main document - - Auto-generated by [https://github.com/peter-evans/create-pull-request] - + - name: Create pull request + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + id: cpr + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update document + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: false + branch: update-doc-patches + branch-suffix: random + delete-branch: true + title: '[bot] Generate doc content for AWS services' + body: | + Updated the main document + - Auto-generated by [https://github.com/peter-evans/create-pull-request] From dc08cf290897064354b3b87f466acd9280c6483f Mon Sep 17 00:00:00 2001 From: Tung Bui Date: Sat, 6 Apr 2024 15:22:14 +0700 Subject: [PATCH 4/4] ci: Fail on error --- .github/workflows/generate-content.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-content.yml b/.github/workflows/generate-content.yml index 6a3f554..552bb8b 100755 --- a/.github/workflows/generate-content.yml +++ b/.github/workflows/generate-content.yml @@ -28,7 +28,7 @@ jobs: run: sudo apt-get install jq -y - name: Generate Content - run: bash generate-content.sh + run: set -e; bash generate-content.sh - name: Commit changes run: |