Skip to content

Commit

Permalink
Add dependabot.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
avidit committed Mar 13, 2024
1 parent fb03b70 commit fc76b47
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: ".github/workflows"
schedule:
interval: "weekly"
21 changes: 13 additions & 8 deletions generate_readme.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/env bash
#!/usr/bin/env bash

# This script generates the README.md file.
# it requires gh to be installed. https://cli.github.com/
Expand All @@ -9,25 +9,29 @@ org="DynamoDS"
output_file="README.md"

if ! which gh &> /dev/null; then
echo "❕gh is not installed.\nPlease install it first. https://cli.github.com/"
echo "❕gh is not installed."
echo "Please install it first. https://cli.github.com/"
exit 1
fi

get_repos() {
list_repos() {
local org=$1
gh repo list $1 \
--visibility public \
--no-archived \
--limit 100 \
--no-archived \
--visibility public \
--json nameWithOwner \
--template '{{range .}}{{.nameWithOwner}}{{"\n"}}{{end}}'
}

echo "# Workflows" > ${output_file}
echo "" >> ${output_file}

for repo in $(get_repos $org); do
echo "\n🔍 Parsing repository: $repo"
echo "🔍 Getting all repositories"
repos=$(list_repos $org)
for repo in $repos; do
echo
echo "ℹ️ Parsing repository: $repo"
workflows=$(gh api /repos/$repo/contents/.github/workflows -q '.[] | select(.type == "file") | .name')
if [ $? -ne 0 ]; then
continue
Expand All @@ -46,4 +50,5 @@ for repo in $(get_repos $org); do
echo "" >> ${output_file}
done

echo "\n✅ Readme generated: $output_file"
echo
echo "✅ Readme generated: $output_file"

0 comments on commit fc76b47

Please sign in to comment.