Skip to content

Commit

Permalink
Prettier linting
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus committed Sep 22, 2024
1 parent fc33b90 commit 83e0add
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 144 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ body:
label: Is there an existing issue for this?
description: Search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
Expand All @@ -36,7 +36,7 @@ body:
description: |
Version where you observed this issue
placeholder: |
vX.Y.Z
vX.Y.Z
render: markdown
validations:
required: true
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ body:
render: markdown
validations:
required: false

2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'Dependabot auto-merge'
name: "Dependabot auto-merge"
on: pull_request

permissions:
Expand Down
45 changes: 22 additions & 23 deletions .github/workflows/check-for-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,33 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install jq
run: |
sudo apt update
sudo apt install -y jq
- name: Install jq
run: |
sudo apt update
sudo apt install -y jq
- name: Generate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./fetch.sh -u "${{ github.repository_owner }}" -o repos.md
./generate.sh -o dashboard.md -i repos.md
if [ -z "$(git status -s -- dashboard.md repos.md)" ]; then
echo No changes to commit
exit 0
fi
git config user.email "check-action@github"
git config user.name "check-action"
git add repos.md dashboard.md
git commit -m "Update markdown files"
git push origin "${GITHUB_REF#refs/heads/}"
- name: Generate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./fetch.sh -u "${{ github.repository_owner }}" -o repos.md
./generate.sh -o dashboard.md -i repos.md
if [ -z "$(git status -s -- dashboard.md repos.md)" ]; then
echo No changes to commit
exit 0
fi
git config user.email "check-action@github"
git config user.name "check-action"
git add repos.md dashboard.md
git commit -m "Update markdown files"
git push origin "${GITHUB_REF#refs/heads/}"
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'Dependency Review'
name: "Dependency Review"
on: [pull_request]

permissions:
Expand All @@ -9,7 +9,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
- name: "Checkout Repository"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 'Dependency Review'
- name: "Dependency Review"
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
6 changes: 3 additions & 3 deletions .github/workflows/osv-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ name: OSV-Scanner

on:
pull_request:
branches: [ "main" ]
branches: ["main"]
push:
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

permissions:
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

permissions: {}

jobs:

check:
name: Check with YAMLLint
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install YAMLLint
run: sudo pip install yamllint
- name: Run YAMLLint
run: "yamllint -d '{extends: relaxed, rules: {line-length: disable, trailing-spaces: disable}}' ."
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install YAMLLint
run: sudo pip install yamllint
- name: Run YAMLLint
run: "yamllint -d '{extends: relaxed, rules: {line-length: disable, trailing-spaces: disable}}' ."
109 changes: 55 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,55 @@
# Github Actions dashboard

This tool generates a dashboard that shows live status of all github action
workflows in a given set of github repositories.

The [`generate.sh`](./generate.sh) script can read input files that contain
single line records of github repositories, scan all workflows listed in
`.github/workflows` and generate a markdown file that shows the current status
of each workflow.

### Usage
```sh
generate.sh [-h] -o OUTFILE [-i FILE]...

-h display this help
-i input file path
-o output markdown file path
```

You can provide multiple input files. The input file value can be a local file
path or an http(s) url.

Input files must have a github repository name per line that follows the syntax
`<user-or-org>/<repo>`.

Lines beginning with `#` are treated as comments.

E.g.
```sh
./generate.sh -o samples/gcp.md -i samples/gcp-repos \
-i https://raw.githubusercontent.com/arjun024/actions-dashboard/master/samples/some-other-gcp-repos
```

See [samples](./samples) for sample inputs and [sample output](./samples/gcp.md).

<img src="https://github.com/arjun024/actions-dashboard/blob/master/samples/sample.png?raw=true" width="550">


### Auto-regenerate

You can use a [github-workflow like
this](.github/workflows/check-for-workflows.yml) that runs the generate script
every day to see if any workflow files have been added/removed from the repos
listed in the input files.

### How to use

* Fork this repository
* Edit the sample input to list your repositories or create an input file or
point to to your list of repos elsewhere
* Run the generate script with the required options
* Edit
[`.github/workflows/check-for-workflows.yml`](.github/workflows/check-for-workflows.yml)
to run `generate.sh` with your command options in the `Generate` step.
# Github Actions dashboard

This tool generates a dashboard that shows live status of all github action
workflows in a given set of github repositories.

The [`generate.sh`](./generate.sh) script can read input files that contain
single line records of github repositories, scan all workflows listed in
`.github/workflows` and generate a markdown file that shows the current status
of each workflow.

### Usage

```sh
generate.sh [-h] -o OUTFILE [-i FILE]...

-h display this help
-i input file path
-o output markdown file path
```

You can provide multiple input files. The input file value can be a local file
path or an http(s) url.

Input files must have a github repository name per line that follows the syntax
`<user-or-org>/<repo>`.

Lines beginning with `#` are treated as comments.

E.g.

```sh
./generate.sh -o samples/gcp.md -i samples/gcp-repos \
-i https://raw.githubusercontent.com/arjun024/actions-dashboard/master/samples/some-other-gcp-repos
```

See [samples](./samples) for sample inputs and [sample output](./samples/gcp.md).

<img src="https://github.com/arjun024/actions-dashboard/blob/master/samples/sample.png?raw=true" width="550">

### Auto-regenerate

You can use a [github-workflow like
this](.github/workflows/check-for-workflows.yml) that runs the generate script
every day to see if any workflow files have been added/removed from the repos
listed in the input files.

### How to use

- Fork this repository
- Edit the sample input to list your repositories or create an input file or
point to to your list of repos elsewhere
- Run the generate script with the required options
- Edit
[`.github/workflows/check-for-workflows.yml`](.github/workflows/check-for-workflows.yml)
to run `generate.sh` with your command options in the `Generate` step.
Loading

0 comments on commit 83e0add

Please sign in to comment.