Skip to content

fix: improve performance infra cost summation (#205) #61

fix: improve performance infra cost summation (#205)

fix: improve performance infra cost summation (#205) #61

Workflow file for this run

name: autoformat-and-bump
on:
push:
branches: [ master ]
jobs:
# bump-version:
# if: "!startsWith(github.event.head_commit.message, 'bump:')"
# runs-on: ubuntu-latest
# name: "Bump version and create changelog with commitizen"
# permissions: write-all
# steps:
# - name: Check out
# uses: actions/checkout@v2
# with:
# token: "${{ secrets.GITHUB_TOKEN }}"
# fetch-depth: 0
# - name: Create bump and changelog
# uses: commitizen-tools/commitizen-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
code-autoformat:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
name: Build (and deploy) documentation
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
# channels: conda-forge, nodefaults
# channel-priority: strict
environment-file: .config/environment.yml
activate-environment: koswat_env
- name: Install Dependencies
run: poetry install --only dev
- name: Autoformat code
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
run: |
poetry run isort .
poetry run black .
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout $GITHUB_HEAD_REF
git commit -am "chore: autoformat with isort & black" && git push || true