Skip to content

Commit

Permalink
updating comments and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
diegovalenzuelaiturra committed Dec 21, 2020
1 parent 8f319e3 commit def4f56
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: YAPF Formatter
# https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions

# *TODO : Add a more informative commit message using variable interpolations
# *TODO : check if we could pass --exclude argument to YAPF
# *TODO : check if we could pass --exclude argument to YAPF, like e.g. --exclude '**/tests/**'

# * NOTE : exit 0 : exit code 0 means 'success'

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ FROM python:3

LABEL "com.github.actions.name"="yapf-formatter"
LABEL "com.github.actions.description"="Run YAPF formatter for Python codes."

LABEL "com.github.actions.icon"="check-circle"
LABEL "com.github.actions.color"="gray-dark"
LABEL "repository"="https://github.com/diegovalenzuelaiturra/yapf-action.git"
LABEL "homepage"="https://github.com/diegovalenzuelaiturra/yapf-action"
LABEL "maintainer"="Diego Valenzuela Iturra <[email protected]>"
Expand Down
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A [GitHub action](https://github.com/diegovalenzuelaiturra/yapf-action) that run

It will automatically commit the changes!

An example worflow can be found at `.github/workflows/main.yml`
An example workflow can be found at `.github/workflows/main.yml`

## Example Workflow

Expand Down Expand Up @@ -37,16 +37,6 @@ jobs:
args: . --verbose --recursive --in-place --parallel

- name: action metadata
# github.action : the name of the action currently running.
# github.actor : the login of the user that initiated the workflow run.
# github.event_name : The name of the event that triggered the workflow run.
# github.job : The job_id of the current job.
# github.ref : The branch or tag ref that triggered the workflow run.
# github.repository : The owner and repository name.
# github.run_id : A unique number for each run within a repository. This number does not change if you re-run the workflow run.
# github.sha : The commit SHA that triggered the workflow run.
# github.workflow : The name of the workflow. If the workflow file doesn't specify a name, the value of this property is the full path of the workflow file in the repository.
# github.workspace : The default working directory for steps and the default location of your repository when using the checkout action.
run: |
echo -e "action : ${{ github.action }}"
echo -e "actor : ${{ github.actor }}"
Expand Down Expand Up @@ -86,3 +76,27 @@ git commit -m "Automation: YAPF Formatter" --all | exit 0
```
For a full list of possible args checkout the [YAPF docs](https://github.com/google/yapf#Usage).
---
```yaml
# github.action : the name of the action currently running.

# github.actor : the login of the user that initiated the workflow run.

# github.event_name : The name of the event that triggered the workflow run.

# github.job : The job_id of the current job.

# github.ref : The branch or tag ref that triggered the workflow run.

# github.repository : The owner and repository name.

# github.run_id : A unique number for each run within a repository. This number does not change if you re-run the workflow run.

# github.sha : The commit SHA that triggered the workflow run.

# github.workflow : The name of the workflow. If the workflow file doesn't specify a name, the value of this property is the full path of the workflow file in the repository.

# github.workspace : The default working directory for steps and the default location of your repository when using the checkout action.
```
3 changes: 1 addition & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# action.yml
name: "YAPF Formatter"

description: "Runs YAPF code formatter for Python."
author: Diego Valenzuela Iturra

inputs:
args: # id of input
Expand Down

0 comments on commit def4f56

Please sign in to comment.