From 2c2305220d88ff9a394c072c4e72a7f3cd528ccc Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 1 Mar 2022 08:47:52 -0500 Subject: [PATCH] add readme, schedule workflow, tag stuff --- .github/workflows/crawl.yaml | 8 ++++++-- README.md | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/crawl.yaml b/.github/workflows/crawl.yaml index 68a1413f1..59fc3f830 100644 --- a/.github/workflows/crawl.yaml +++ b/.github/workflows/crawl.yaml @@ -4,6 +4,8 @@ on: workflow_dispatch: push: branches: ['main'] + schedule: + - cron: '0 6 * * *' # Daily at 6 AM permissions: contents: write @@ -20,12 +22,14 @@ jobs: with: install_components: alpha,beta - - run: ./crawl.sh - run: | + rm -r gcloud/ + ./crawl.sh git config user.name "Automated" git config user.email "actions@users.noreply.github.com" git add -A timestamp=$(date -u) git commit -m "gcloud: ${timestamp}" || exit 0 - git push + git tag $(gcloud version --format=json | jq -r '."Google Cloud SDK"') + git push --tags diff --git a/README.md b/README.md new file mode 100644 index 000000000..ad19f39d6 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# `gcloud help` + +This repo automatically scrapes the help text for [`gcloud`](https://cloud.google.com/sdk/) and puts it in this Git repo. + +Scraping is automated with GitHub Actions. +Every day, the workflow installs the latest `gcloud` release, and crawls the output of `gcloud help` and all subgroups and subcommands. +The output is placed in [the `gcloud/` directory](./gcloud/). + +This produces the same content as the [official CLI reference](https://cloud.google.com/sdk/gcloud/reference), in text form, with history. +This enables diffing the help text of two `gcloud` releases. + +--- + +All text content is owned by Google, licensed under the [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/). + +Code in the repo is owned by me, licensed under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).