Skip to content

Commit

Permalink
Use prebuilt image
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPlowman committed Oct 11, 2024
1 parent 8e48442 commit a1b9879
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 20 deletions.
22 changes: 22 additions & 0 deletions .github/actions/local/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "GitHub Stats Analyser"
description: "Analyse GitHub and generate statistics for a user's repositories"
author: "Jack Plowman"

branding:
color: black
icon: code

runs:
using: "docker"
image: "../../../Dockerfile"
env:
GITHUB_ACTION: "true"

inputs:
GITHUB_TOKEN:
description: "The GitHub token"
required: false
default: ${{ github.token }}
REPOSITORY_OWNER:
description: "The GitHub repository owner"
required: true
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ updates:
directories:
- "/"
- ".github/actions/setup-dependencies"
- ".github/actions/local"
commit-message:
prefix: "deps(github-actions)"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: ./.github/actions/setup-dependencies

- name: Run GitHub Stats Analyser
uses: ./
uses: ./.github/actions/local
with:
REPOSITORY_OWNER: ${{ github.REPOSITORY_OWNER }}

Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- [Introduction](#introduction)
- [Usage](#usage)
- [GitHub Action Example](#github-action-example)
- [GitHub Action Pre-built Image](#github-action-pre-built-image)
- [GitHub Action Inputs](#github-action-inputs)
- [License](#license)

Expand All @@ -32,20 +31,6 @@ The GitHub Action is designed to be used in a workflow.
REPOSITORY_OWNER: jackplowman # Put your GitHub username here or use ${{ github.REPOSITORY_OWNER }}
```
> [!TIP]
> It's recommended to use the pre-built Docker image as it will be faster to install.
### GitHub Action Pre-built Image
You can use the pre-built Docker image by adding the following to your workflow:
```yaml
- name: GitHub Stats Analyser
uses: docker://ghcr.io/jackplowman/github-stats-analyser:v1.1.0
with:
GITHUB_TOKEN: ${{ inputs.token }}
```
### GitHub Action Inputs
| Name | Required | Description | Type | Default |
Expand Down
11 changes: 7 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: "GitHub Stats Analyser"
description: "Analyse GitHub and generate statistics for a user's repositories"
author: "Jack Plowman"

branding:
color: black
icon: code

runs:
using: "docker"
image: "Dockerfile"
uses: docker://ghcr.io/jackplowman/github-stats-analyser:v1.1.0
env:
GITHUB_ACTION: "true"

inputs:
GITHUB_TOKEN:
description: "The GitHub token"
Expand All @@ -14,6 +20,3 @@ inputs:
REPOSITORY_OWNER:
description: "The GitHub repository owner"
required: true
branding:
color: black
icon: code

0 comments on commit a1b9879

Please sign in to comment.