diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e38b33..c2913ba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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' diff --git a/Dockerfile b/Dockerfile index 17b2e28..da565fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 " diff --git a/README.md b/README.md index 1f922ae..4fe8552 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 }}" @@ -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. +``` diff --git a/action.yml b/action.yml index 92ed6ca..c3c160e 100644 --- a/action.yml +++ b/action.yml @@ -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