github-create-and-add-labels-all-repos-using-python #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github-create-and-add-labels-all-repos-using-python | |
on: | |
schedule: | |
- cron: "0 9 * * *" # runs daily at 9 AM utc | |
workflow_dispatch: | |
inputs: | |
organizarion: | |
description: 'GitHub organization name' | |
required: true | |
type: string | |
default: 'devwithkrishna' | |
jobs: | |
github-create-and-add-labels-all-repos-using-python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: Token generator | |
uses: githubofkrishnadhas/github-access-using-githubapp@v2 | |
id: token-generation | |
with: | |
github_app_id: ${{ secrets.TOKEN_GENERATOR_APPID }} | |
github_app_private_key: ${{ secrets.TOKEN_GENERATOR_PRIVATE_KEY }} | |
- name: set up python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: package installations | |
run: | | |
pip install poetry | |
poetry install | |
- name: execute python program | |
env: | |
GH_TOKEN: ${{ steps.token-generation.outputs.token }} | |
ORGANIZATION: 'devwithkrishna' | |
run: | | |
poetry run python3 create_new_labels.py | |
- name: Completed | |
run: | | |
echo "program completed successfully" |