mirror of
https://github.com/creyD/autopep8_action.git
synced 2026-04-17 05:40:32 +02:00
Minor Cleanup
This commit is contained in:
19
README.md
19
README.md
@@ -21,23 +21,26 @@ The following parameters can be used in your custom action configuration.
|
|||||||
|
|
||||||
This is a simple usage example of this script:
|
This is a simple usage example of this script:
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
name: Autopep 8
|
# This action works with pull requests and pushes
|
||||||
|
name: Continuous Integration
|
||||||
|
|
||||||
on: [pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
# Make sure the actual branch is checked out when running on pull requests
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
- uses: creyD/action_autopep8@master
|
- uses: creyD/action_autopep8@master
|
||||||
with:
|
|
||||||
dependencies: 'requirements.txt'
|
|
||||||
branch: ${{ github.head_ref }}
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: 'Autopep8 Action'
|
name: Autopep8 Action
|
||||||
description: 'Automatically runs the autopep8 command against any commit/ pull request created.'
|
description: Automatically runs the autopep8 command on all your changes.
|
||||||
|
|
||||||
author: Conrad Großer <grosserconrad@gmail.com>
|
author: Conrad Großer <grosserconrad@gmail.com>
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ _git_changed() {
|
|||||||
[[ -n "$(git status -s)" ]]
|
[[ -n "$(git status -s)" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Installing dependencies..."
|
echo "Installing autopep8..."
|
||||||
pip install -q --upgrade pip
|
pip install -q --upgrade pip
|
||||||
# Install dependencies
|
|
||||||
pip install -q autopep8
|
pip install -q autopep8
|
||||||
|
|
||||||
# Install custom project dependencies if applicable
|
# Install custom project dependencies if applicable
|
||||||
|
|||||||
Reference in New Issue
Block a user