Skip to content

updated resume and cv - Dec 4, 2024 #5

updated resume and cv - Dec 4, 2024

updated resume and cv - Dec 4, 2024 #5

name: Format code
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the master branch
push:
branches: [ master, main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
formatting:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Format Python code with black
run: |
pip install black
black .
- name: Sort imports with isort
run: |
pip install isort
isort --recursive .
- name: Get datetime
id: get-datetime
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> "$GITHUB_OUTPUT"
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Github Actions
author_email: [email protected]
add: "."
message: "formatted code by GitHub Actions on ${{ steps.get-datetime.outputs.NOW }}"