Skip to content

Commit

Permalink
Add README entries check (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn authored Nov 6, 2024
1 parent fd7184e commit b5166f4
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ repos:
language: system
entry: ./update-dependabot.sh
pass_filenames: false
- id: check-readme
name: Check README entries
language: system
entry: ./check_readme.sh
pass_filenames: false
24 changes: 24 additions & 0 deletions check_readme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

actions_dir=".github/actions"
readme_file="docs/README.md"
missing_entries=0

# List all folders under .github/actions
folders=$(ls -d $actions_dir/*/)

# Check each folder
for folder in $folders; do
action_name=$(basename $folder)
search_string="### $action_name"
if ! grep -q "$search_string" "$readme_file"; then
echo "No entry found for $search_string in README.md"
((missing_entries++))
fi
done

# Report the number of missing entries
if [ $missing_entries -gt 0 ]; then
echo "$missing_entries entries not found in README.md"
exit 1
fi
146 changes: 144 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Here follows the list of GitHub Actions topics available in the current document
- [GitHub Actions provided by us](#github-actions-provided-by-us)
- [automate-dependabot](#automate-dependabot)
- [automate-propagation](#automate-propagation)
- [calculate-next-internal-version](#calculate-next-internal-version)
- [configure-git-author](#configure-git-author)
- [dbp-charts](#dbp-charts)
- [docker-build-image](#docker-build-image)
- [docker-dump-containers-logs](#docker-dump-containers-logs)
- [docker-scan-image-dirs](#docker-scan-image-dirs)
Expand All @@ -42,10 +44,12 @@ Here follows the list of GitHub Actions topics available in the current document
- [get-build-info](#get-build-info)
- [git-check-existing-tag](#git-check-existing-tag)
- [get-commit-message](#get-commit-message)
- [gh-cache-cleanup-on-merge](#gh-cache-cleanup-on-merge)
- [git-commit-changes](#git-commit-changes)
- [git-latest-tag](#git-latest-tag)
- [github-check-upcoming-runs](#github-check-upcoming-runs)
- [github-deployment-create and github-deployment-status-update](#github-deployment-create-and-github-deployment-status-update)
- [github-deployment-create](#github-deployment-create)
- [github-deployment-status-update](#github-deployment-status-update)
- [github-deployments-delete](#github-deployments-delete)
- [github-download-file](#github-download-file)
- [github-https-auth](#github-https-auth)
Expand Down Expand Up @@ -76,13 +80,24 @@ Here follows the list of GitHub Actions topics available in the current document
- [rancher](#rancher)
- [reportportal-prepare](#reportportal-prepare)
- [reportportal-summarize](#reportportal-summarize)
- [resolve-preview-name](#resolve-preview-name)
- [send-slack-notification-slow-job](#send-slack-notification-slow-job)
- [send-slack-notification](#send-slack-notification)
- [send-teams-notification](#send-teams-notification)
- [setup-docker](#setup-docker)
- [setup-github-release-binary](#setup-github-release-binary)
- [setup-helm-docs](#setup-helm-docs)
- [setup-java-build](#setup-java-build)
- [setup-jx-release-version](#setup-jx-release-version)
- [setup-kcadm](#setup-kcadm)
- [setup-kind](#setup-kind)
- [setup-kubepug](#setup-kubepug)
- [setup-pysemver](#setup-pysemver)
- [setup-rancher-cli](#setup-rancher-cli)
- [setup-terraform-docs](#setup-terraform-docs)
- [setup-updatebot](#setup-updatebot)
- [update-deployment-runtime-versions](#update-deployment-runtime-versions)
- [update-pom-to-next-pre-release](#update-pom-to-next-pre-release)
- [update-project-base-tag](#update-project-base-tag)
- [validate-maven-versions](#validate-maven-versions)
- [veracode](#veracode)
Expand Down Expand Up @@ -377,6 +392,16 @@ Another token is also needed to handled approval. It can be the default `GITHUB_
approval-token: ${{ secrets.GITHUB_TOKEN }}
```

### calculate-next-internal-version

Calculate next internal version based on existing tags

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/calculate-next-internal-version@ref
with:
next-version: 1.2.3
```

### configure-git-author

Configures the git username and email to associate commits with the provided identity
Expand All @@ -391,6 +416,12 @@ Configures the git username and email to associate commits with the provided ide

The two vars in the previous snippet are [workflow configuration variables](https://github.blog/changelog/2023-01-10-github-actions-support-for-configuration-variables-in-workflows/) that can be created at organization level and shared across different repositories.

### dbp-charts

A collection of actions used in Alfresco acs-deployment repository to manage Helm charts (mostly deprecated).

See [dbp-charts](../.github/actions/dbp-charts/) for more details.

### docker-build-image

Build docker image based on supplied jar files. It replaces `image-dir` and `image-tag` in the
Expand Down Expand Up @@ -590,6 +621,16 @@ This action requires a checkout with fetch-depth option as follow:
- uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@ref
```

### gh-cache-cleanup-on-merge

Performs the cleanup of cache entries related with already closed PR:

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/gh-cache-cleanup-on-merge@ref
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
```

### git-commit-changes

Commits local changes after configuring git user and showing the status of what is going be committed.
Expand Down Expand Up @@ -637,7 +678,9 @@ With proper concurrency logic in place, the latest run might have been cancelled
workflow: my-workflow.yml
```

### github-deployment-create and github-deployment-status-update
### github-deployment-create

### github-deployment-status-update

These actions create a [GitHub deployment](https://docs.github.com/en/rest/deployments/deployments) and allow updating its status. That can be useful to track progression on a workflow pipeline.

Expand Down Expand Up @@ -1282,6 +1325,17 @@ This will give the following sample output on the GH Actions run summary (when u

![GH Actions Summary Report Portal](./images/rp-gh-summary.png)

### resolve-preview-name

Resolve preview name based on the PR number and run number:

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/resolve-preview-name@ref
id: resolve-preview-name
- run: |
echo ${{ steps.resolve-preview-name.outputs.preview-name }}
```

### send-slack-notification-slow-job

Sends a slack notification when current run took more time than specified via `max-build-time-seconds` input.
Expand Down Expand Up @@ -1445,6 +1499,16 @@ Hosted runners.
Allows the installation of a generic binary from GitHub Releases and add it to the PATH.
See [setup-helm-docs](../.github/actions/setup-helm-docs/action.yml) for a usage example.

### setup-helm-docs

Install the helm-docs binary from GitHub Releases and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-helm-docs@ref
with:
version: "1.14.2"
```

### setup-java-build

[setup-java-build](../.github/actions/setup-java-build/action.yml) performs the setup of required build tools such as Java and Maven.
Expand All @@ -1460,6 +1524,26 @@ If the Maven settings file is not provided at all, then a default settings file
maven-settings: ".ci.settings.xml" # optional
```

### setup-jx-release-version

Set up a specific version of jx-release-version and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-jx-release-version@ref
with:
version: "2.2.3"
```

### setup-kcadm

Setup the `kcadm` binary from Keycloak distribution and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-kcadm@ref
with:
version: "24.0.5"
```

### setup-kind

Spin up a local kubernetes cluster with nginx ingress exposing http/https ports.
Expand All @@ -1483,6 +1567,64 @@ Spin up a local kubernetes cluster with nginx ingress exposing http/https ports.
helm install acs ./helm/chart
```

### setup-kubepug

Install the Kubernetes preupgrade checker and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-kubepug@ref
with:
version: "1.3.2"
```

### setup-pysemver

Install the pysemver binary from GitHub Releases and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-pysemver@ref
with:
version: "2.13.0"
```

### setup-rancher-cli

Install the Rancher CLI binary from GitHub Releases and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-rancher-cli@ref
with:
version: "2.9.2"
```

### setup-terraform-docs

Install the terraform-docs binary from GitHub Releases and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-terraform-docs@ref
with:
version: "0.16.0"
```

### setup-updatebot

Install the updatebot binary from GitHub Releases and add it to the PATH.

```yaml
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-updatebot@ref
with:
version: "1.1.60"
```

### update-deployment-runtime-versions

For more information, see [update-deployment-runtime-versions](../.github/actions/update-deployment-runtime-versions/action.yml).

### update-pom-to-next-pre-release

For more information see [update-pom-to-next-pre-release](../.github/actions/update-pom-to-next-pre-release/action.yml).

### update-project-base-tag

Used to update a base tag in the release descriptor. It will add or update the
Expand Down

0 comments on commit b5166f4

Please sign in to comment.