Skip to content

github-create-and-add-labels-all-repos-using-python #65

github-create-and-add-labels-all-repos-using-python

github-create-and-add-labels-all-repos-using-python #65

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"