Skip to content

githubofkrishnadhas creating techops-repo1 #48

githubofkrishnadhas creating techops-repo1

githubofkrishnadhas creating techops-repo1 #48

name: create-github-repository-using-github-workflow
on:
workflow_dispatch:
inputs:
organization:
type: string
default: 'devwithkrishna'
description: 'The GitHub organization where the repository will be created.'
required: true
repository_name:
type: string
default: ''
description: 'Enter the repository name'
required: true
repository_description:
type: string
required: true
description: 'A short description of the repository.if more than a word enclose in double quotes'
private:
type: boolean
default: false
description: 'Whether the repository is private.'
visibility:
type: choice
options:
- public
- private
required: true
has_issues:
type: boolean
description: 'Either true to enable issues for this repository or false to disable them.'
default: true
has_projects:
type: boolean
default: true
description: 'Either true to enable projects for this repository or false to disable them'
has_wiki:
type: boolean
default: true
description: 'Either true to enable the wiki for this repository or false to disable it.'
gitignore_template:
type: choice
options:
- AL
- Actionscript
- Ada
- Agda
- Android
- AppEngine
- AppceleratorTitanium
- ArchLinuxPackages
- Autotools
- C++
- C
- CFWheels
- CMake
- CONTRIBUTING.md
- CUDA
- CakePHP
- ChefCookbook
- Clojure
- CodeIgniter
- CommonLisp
- Composer
- Concrete5
- Coq
- CraftCMS
- D
- DM
- Dart
- Delphi
- Drupal
- EPiServer
- Eagle
- Elisp
- Elixir
- Elm
- Erlang
- ExpressionEngine
- ExtJs
- Fancy
- Finale
- FlaxEngine
- ForceDotCom
- Fortran
- FuelPHP
- GWT
- Gcov
- GitBook
- Go
- Godot
- Gradle
- Grails
- Haskell
- IGORPro
- Idris
- JBoss
- JENKINS_HOME
- Java
- Jekyll
- Joomla
- Julia
- KiCad
- Kohana
- Kotlin
- LabVIEW
- Laravel
- Leiningen
- LemonStand
- Lilypond
- Lithium
- Lua
- Magento
- Maven
- Mercury
- MetaProgrammingSystem
- Nanoc
- Nim
- Node
- OCaml
- Objective-C
- Opa
- OpenCart
- OracleForms
- Packer
- Perl
- Phalcon
- PlayFramework
- Plone
- Prestashop
- Processing
- PureScript
- Python
- Qooxdoo
- Qt
- R
- ROS
- Racket
- Rails
- Raku
- RhodesRhomobile
- Ruby
- Rust
- SCons
- Sass
- Scala
- Scheme
- Scrivener
- Sdcc
- SeamGen
- SketchUp
- Smalltalk
- Stella
- SugarCRM
- Swift
- Symfony
- SymphonyCMS
- TeX
- Terraform
- Textpattern
- TurboGears2
- TwinCAT3
- Typo3
- Unity
- UnrealEngine
- WordPress
- Xojo
- Yeoman
- Yii
- ZendFramework
- Zephir
required: false
description: 'Desired language or platform .gitignore template to apply. Use the name of the template'
license_template:
required: false
description: 'Choose license template'
type: choice
options:
- AFL-3.0
- Apache-2.0
- Artistic-2.0
- BSL-1.0
- BSD-2-Clause
- BSD-3-Clause
- BSD-3-Clause-Clear
- BSD-4-Clause
- 0BSD
- CC0-1.0
- CC-BY-4.0
- CC-BY-SA-4.0
- WTFPL
- ECL-2.0
- EPL-1.0
- EPL-2.0
- EUPL-1.1
- AGPL-3.0
- GPL-2.0
- GPL-3.0
- LGPL
- LGPL-2.1
- LGPL-3.0
- ISC
- LPPL-1.3c
- MS-PL
- MIT
- MPL-2.0
- OSL-3.0
- PostgreSQL
- OFL-1.1
- NCSA
- Unlicense
- Zlib
env:
ORGANIZATION: ${{ github.event.inputs.organization }}
REPOSITORY_NAME: ${{ github.event.inputs.repository_name }}
REPOSITORY_DESCRIPTION: ${{ github.event.inputs.repository_description }}
PRIVATE: ${{ github.event.inputs.private }}
VISIBILITY: ${{ github.event.inputs.visibility }}
HAS_ISSUES: ${{ github.event.inputs.has_issues }}
HAS_PROJECTS: ${{ github.event.inputs.has_projects }}
HAS_WIKI: ${{ github.event.inputs.has_wiki }}
GITIGNORE_TEMPLATE: ${{ github.event.inputs.gitignore_template }}
LICENSE_TEMPLATE: ${{ github.event.inputs.license_template }}
run-name: ${{ github.actor }} creating ${{ inputs.repository_name }}
jobs:
github-repository-creation-using-github-workflow:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Listing the files
run: ls -la
- name: Execute the program
env:
GH_TOKEN: ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
run: |
bash create_repository_in_github.sh ${{ inputs.organization }} ${{ inputs.repository_name }} ${{ inputs.repository_description }} ${{ inputs.private }} ${{ inputs.visibility }} ${{ inputs.has_issues}} ${{ inputs.has_projects }} ${{ inputs.has_wiki}} ${{ inputs.gitignore_template}} ${{ inputs.license_template}}