diff --git a/.github/workflows/workflows.sh b/.github/workflows/workflows.sh new file mode 100755 index 0000000..9a60f7c --- /dev/null +++ b/.github/workflows/workflows.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +repos=$(gh repo list googleworkspace \ + --no-archived \ + --visibility public \ + --source \ + --json name --jq '.[] .name' \ + -L 1000 | sort) + +FILE=README.md +ORG=https://github.com/googleworkspace + +# delete all lines starting after matching string +sed -n '/WORKFLOWS_INSERT_AFTER/q;p' <$FILE >$FILE.tmp +mv $FILE.tmp $FILE + +echo "" >>$FILE +echo "Writing to $FILE" + +echo "## Workflows" >>$FILE +echo "" >>$FILE + +echo "| Repository | Test | Lint | Release |" >>$FILE +echo "| --- | --- | --- | --- |" >>$FILE + +badge() { + local repo=$1 + local workflow=$2 + echo "[![](${ORG}/${repo}/actions/workflows/${workflow}.yml/badge.svg?branch=main)](${ORG}/${repo}/actions/workflows/${workflow}.yml)" +} + +for repo in $repos; do + echo "| [${repo}](${ORG}/${repo}) | $(badge ${repo} test) | $(badge ${repo} lint) | $(badge ${repo} release-please) |" >>$FILE +done diff --git a/.github/workflows/workflows.yml b/.github/workflows/workflows.yml new file mode 100644 index 0000000..fd2ba4e --- /dev/null +++ b/.github/workflows/workflows.yml @@ -0,0 +1,36 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +--- +name: Workflows +on: [ workflow_dispatch, push] +jobs: + status-badges: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{secrets.GOOGLEWORKSPACE_BOT_TOKEN}} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + # required otherwise GitHub blocks infinite loops in pushes originating in an action + token: ${{ secrets.GOOGLEWORKSPACE_BOT_TOKEN }} + - run: .github/workflows/workflows.sh + - run: | + git checkout -b chore/workflows + git add README.md + git config user.email "googleworkspace-bot@google.com" + git config user.name "googleworkspace-bot" + git commit -am 'chore: update workflow status' + git push -u origin chore/workflows + gh pr create --fill --head main --base chore/workflows diff --git a/README.md b/README.md index 8b6dacc..f617065 100644 --- a/README.md +++ b/README.md @@ -1 +1,36 @@ A repository holding defaults for the [Google Workspace](https://github.com/googleworkspace) organization. + +## Workflows + +| Repository | Test | Lint | Release | +| --- | --- | --- | --- | +| [.github](https://github.com/googleworkspace/.github) | [![](https://github.com/googleworkspace/.github/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/.github/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/.github/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/.github/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/.github/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/.github/actions/workflows/release-please.yml) | +| [add-ons-samples](https://github.com/googleworkspace/add-ons-samples) | [![](https://github.com/googleworkspace/add-ons-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/add-ons-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/add-ons-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/add-ons-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/add-ons-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/add-ons-samples/actions/workflows/release-please.yml) | +| [appointment-scheduler-codelab](https://github.com/googleworkspace/appointment-scheduler-codelab) | [![](https://github.com/googleworkspace/appointment-scheduler-codelab/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/appointment-scheduler-codelab/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/appointment-scheduler-codelab/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/appointment-scheduler-codelab/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/appointment-scheduler-codelab/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/appointment-scheduler-codelab/actions/workflows/release-please.yml) | +| [apps-script-intro-codelab](https://github.com/googleworkspace/apps-script-intro-codelab) | [![](https://github.com/googleworkspace/apps-script-intro-codelab/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-intro-codelab/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/apps-script-intro-codelab/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-intro-codelab/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/apps-script-intro-codelab/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-intro-codelab/actions/workflows/release-please.yml) | +| [apps-script-oauth1](https://github.com/googleworkspace/apps-script-oauth1) | [![](https://github.com/googleworkspace/apps-script-oauth1/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-oauth1/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/apps-script-oauth1/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-oauth1/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/apps-script-oauth1/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-oauth1/actions/workflows/release-please.yml) | +| [apps-script-oauth2](https://github.com/googleworkspace/apps-script-oauth2) | [![](https://github.com/googleworkspace/apps-script-oauth2/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-oauth2/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/apps-script-oauth2/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-oauth2/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/apps-script-oauth2/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-oauth2/actions/workflows/release-please.yml) | +| [apps-script-samples](https://github.com/googleworkspace/apps-script-samples) | [![](https://github.com/googleworkspace/apps-script-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/apps-script-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/apps-script-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/apps-script-samples/actions/workflows/release-please.yml) | +| [browser-samples](https://github.com/googleworkspace/browser-samples) | [![](https://github.com/googleworkspace/browser-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/browser-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/browser-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/browser-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/browser-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/browser-samples/actions/workflows/release-please.yml) | +| [chat-framework-nodejs](https://github.com/googleworkspace/chat-framework-nodejs) | [![](https://github.com/googleworkspace/chat-framework-nodejs/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/chat-framework-nodejs/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/chat-framework-nodejs/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/chat-framework-nodejs/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/chat-framework-nodejs/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/chat-framework-nodejs/actions/workflows/release-please.yml) | +| [cloud-search-samples](https://github.com/googleworkspace/cloud-search-samples) | [![](https://github.com/googleworkspace/cloud-search-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/cloud-search-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/cloud-search-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/cloud-search-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/cloud-search-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/cloud-search-samples/actions/workflows/release-please.yml) | +| [docs-transcript-codelab](https://github.com/googleworkspace/docs-transcript-codelab) | [![](https://github.com/googleworkspace/docs-transcript-codelab/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/docs-transcript-codelab/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/docs-transcript-codelab/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/docs-transcript-codelab/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/docs-transcript-codelab/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/docs-transcript-codelab/actions/workflows/release-please.yml) | +| [dotnet-samples](https://github.com/googleworkspace/dotnet-samples) | [![](https://github.com/googleworkspace/dotnet-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/dotnet-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/dotnet-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/dotnet-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/dotnet-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/dotnet-samples/actions/workflows/release-please.yml) | +| [drive-quickeditors](https://github.com/googleworkspace/drive-quickeditors) | [![](https://github.com/googleworkspace/drive-quickeditors/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/drive-quickeditors/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/drive-quickeditors/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/drive-quickeditors/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/drive-quickeditors/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/drive-quickeditors/actions/workflows/release-please.yml) | +| [drive-utils](https://github.com/googleworkspace/drive-utils) | [![](https://github.com/googleworkspace/drive-utils/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/drive-utils/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/drive-utils/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/drive-utils/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/drive-utils/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/drive-utils/actions/workflows/release-please.yml) | +| [gmail-add-on-codelab](https://github.com/googleworkspace/gmail-add-on-codelab) | [![](https://github.com/googleworkspace/gmail-add-on-codelab/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/gmail-add-on-codelab/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/gmail-add-on-codelab/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/gmail-add-on-codelab/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/gmail-add-on-codelab/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/gmail-add-on-codelab/actions/workflows/release-please.yml) | +| [go-samples](https://github.com/googleworkspace/go-samples) | [![](https://github.com/googleworkspace/go-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/go-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/go-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/go-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/go-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/go-samples/actions/workflows/release-please.yml) | +| [gsuite-apis-intro](https://github.com/googleworkspace/gsuite-apis-intro) | [![](https://github.com/googleworkspace/gsuite-apis-intro/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/gsuite-apis-intro/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/gsuite-apis-intro/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/gsuite-apis-intro/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/gsuite-apis-intro/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/gsuite-apis-intro/actions/workflows/release-please.yml) | +| [hangouts-chat-apps-script-codelab](https://github.com/googleworkspace/hangouts-chat-apps-script-codelab) | [![](https://github.com/googleworkspace/hangouts-chat-apps-script-codelab/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hangouts-chat-apps-script-codelab/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/hangouts-chat-apps-script-codelab/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hangouts-chat-apps-script-codelab/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/hangouts-chat-apps-script-codelab/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hangouts-chat-apps-script-codelab/actions/workflows/release-please.yml) | +| [hangouts-chat-samples](https://github.com/googleworkspace/hangouts-chat-samples) | [![](https://github.com/googleworkspace/hangouts-chat-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hangouts-chat-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/hangouts-chat-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hangouts-chat-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/hangouts-chat-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hangouts-chat-samples/actions/workflows/release-please.yml) | +| [hubot-google-hangouts-chat](https://github.com/googleworkspace/hubot-google-hangouts-chat) | [![](https://github.com/googleworkspace/hubot-google-hangouts-chat/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hubot-google-hangouts-chat/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/hubot-google-hangouts-chat/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hubot-google-hangouts-chat/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/hubot-google-hangouts-chat/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/hubot-google-hangouts-chat/actions/workflows/release-please.yml) | +| [java-samples](https://github.com/googleworkspace/java-samples) | [![](https://github.com/googleworkspace/java-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/java-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/java-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/java-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/java-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/java-samples/actions/workflows/release-please.yml) | +| [md2googleslides](https://github.com/googleworkspace/md2googleslides) | [![](https://github.com/googleworkspace/md2googleslides/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/md2googleslides/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/md2googleslides/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/md2googleslides/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/md2googleslides/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/md2googleslides/actions/workflows/release-please.yml) | +| [ml-integration-samples](https://github.com/googleworkspace/ml-integration-samples) | [![](https://github.com/googleworkspace/ml-integration-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/ml-integration-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/ml-integration-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/ml-integration-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/ml-integration-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/ml-integration-samples/actions/workflows/release-please.yml) | +| [node-samples](https://github.com/googleworkspace/node-samples) | [![](https://github.com/googleworkspace/node-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/node-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/node-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/node-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/node-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/node-samples/actions/workflows/release-please.yml) | +| [php-samples](https://github.com/googleworkspace/php-samples) | [![](https://github.com/googleworkspace/php-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/php-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/php-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/php-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/php-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/php-samples/actions/workflows/release-please.yml) | +| [python-samples](https://github.com/googleworkspace/python-samples) | [![](https://github.com/googleworkspace/python-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/python-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/python-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/python-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/python-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/python-samples/actions/workflows/release-please.yml) | +| [ruby-samples](https://github.com/googleworkspace/ruby-samples) | [![](https://github.com/googleworkspace/ruby-samples/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/ruby-samples/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/ruby-samples/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/ruby-samples/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/ruby-samples/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/ruby-samples/actions/workflows/release-please.yml) | +| [sheets-api-codelab](https://github.com/googleworkspace/sheets-api-codelab) | [![](https://github.com/googleworkspace/sheets-api-codelab/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/sheets-api-codelab/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/sheets-api-codelab/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/sheets-api-codelab/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/sheets-api-codelab/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/sheets-api-codelab/actions/workflows/release-please.yml) | +| [slides-api](https://github.com/googleworkspace/slides-api) | [![](https://github.com/googleworkspace/slides-api/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/slides-api/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/slides-api/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/slides-api/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/slides-api/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/slides-api/actions/workflows/release-please.yml) | +| [solutions](https://github.com/googleworkspace/solutions) | [![](https://github.com/googleworkspace/solutions/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/googleworkspace/solutions/actions/workflows/test.yml) | [![](https://github.com/googleworkspace/solutions/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/googleworkspace/solutions/actions/workflows/lint.yml) | [![](https://github.com/googleworkspace/solutions/actions/workflows/release-please.yml/badge.svg?branch=main)](https://github.com/googleworkspace/solutions/actions/workflows/release-please.yml) |