-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (44 loc) · 1.44 KB
/
delete_repo_secret.yml
File metadata and controls
45 lines (44 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: delete-github-repository-secrets-using-workflow
on:
workflow_dispatch:
inputs:
organization:
type: string
default: 'devwithkrishna'
description: 'The GitHub organization where the Secret will be delted from.'
required: true
repository_name:
type: string
description: 'Repository from which secret to be deleted'
required: true
secret_name:
type: string
description: "Secret name to delete from org"
required: true
run-name: ${{ github.actor }} deleting secret ${{ inputs.secret_name }} from ${{ inputs.repository_name }}
jobs:
delete-github-repository-secrets-using-workflow:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: package installations
run: |
pip install pipenv
pipenv install
- name: delete github org secret
env:
GH_TOKEN: ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
repository_name: ${{ inputs.repository_name }}
secret_name: ${{ inputs.secret_name }}
organization: ${{ inputs.organization }}
run: |
pipenv run python3 delete_repo_secret.py
echo "Secret deleted"
- name: Completed
run: |
echo "program completed successfully"