Skip to content

Commit

Permalink
chore(renovate): update renovate config (#1204)
Browse files Browse the repository at this point in the history
  • Loading branch information
vascoalramos authored and aquemy committed Dec 21, 2022
1 parent ce84c81 commit 309b5c4
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 86 deletions.
159 changes: 81 additions & 78 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,81 @@
name: Pull Request


on:
pull_request:

jobs:
commitlint:
name: Lint commit message
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: wagoid/commitlint-github-action@v5

lint:
if: github.actor != 'renovate[bot]'
name: Lint source code
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configurating Git
run: |
git config user.email "[email protected]"
git config user.name "Azory YData Bot"
git config core.autocrlf false
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- uses: actions/cache@v3
name: Cache pip dependencies
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements-test.txt
- name: Install the package
run: make install

- name: Validate code formatting
run: make lint

- name: Commit code formatting changes
if: always()
id: commit
run: |
if [[ `git status --porcelain --untracked-files=no` ]]; then
echo "CHANGES=true" >> $GITHUB_OUTPUT
git add -u
git commit -m "[skip ci] Code formatting" -a
else
echo "CHANGES=false" >> $GITHUB_OUTPUT
fi
- name: Push changes
uses: ad-m/[email protected]
if: always() && steps.commit.outputs.CHANGES == 'true'
with:
branch: ${{ github.head_ref }}
github_token: ${{ secrets.ACCESS_TOKEN }}
name: Pull Request


on:
push:
branches:
- renovate/**
pull_request:

jobs:
commitlint:
name: Lint commit message
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: wagoid/commitlint-github-action@v5

lint:
if: github.actor != 'renovate[bot]'
name: Lint source code
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configurating Git
run: |
git config user.email "[email protected]"
git config user.name "Azory YData Bot"
git config core.autocrlf false
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- uses: actions/cache@v3
name: Cache pip dependencies
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements-test.txt
- name: Install the package
run: make install

- name: Validate code formatting
run: make lint

- name: Commit code formatting changes
if: always()
id: commit
run: |
if [[ `git status --porcelain --untracked-files=no` ]]; then
echo "CHANGES=true" >> $GITHUB_OUTPUT
git add -u
git commit -m "[skip ci] Code formatting" -a
else
echo "CHANGES=false" >> $GITHUB_OUTPUT
fi
- name: Push changes
uses: ad-m/[email protected]
if: always() && steps.commit.outputs.CHANGES == 'true'
with:
branch: ${{ github.head_ref }}
github_token: ${{ secrets.ACCESS_TOKEN }}
10 changes: 2 additions & 8 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"baseBranches": ["develop"],
"packageRules": [
{
"matchManagers": ["github-actions"],
"semanticCommitType": "chore",
"semanticCommitScope": "actions"
}
"extends": [
"github>ydataai/renovate-config"
]
}

0 comments on commit 309b5c4

Please sign in to comment.