@@ -23,41 +23,39 @@ jobs:
2323 create_or_update_repository_secrets :
2424 runs-on : ubuntu-latest
2525 steps :
26- steps :
27- - name : git checkout
28- uses : actions/checkout@v4
29- - name : Set up Python
30- uses : actions/setup-python@v2
31- with :
32- python-version : ' 3.11'
33- - name : package installations
34- run : |
35- pip install pipenv
36- pipenv install
37- - name : get public key
38- id : get-public-key
39- env :
40- GH_TOKEN : ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
41- run : |
42- pipenv run python3 get_repository_public_key --organization ${{ inputs.organization }} \
43- --repository_name ${{ inputs.repository_name }}
44- - name : Encrypt secret
45- id : encrypt-secret
46- env :
47- REPOSITORY_PUBLIC_KEY : ${{ env.REPOSITORY_PUBLIC_KEY }}
48- SECRET_VALUE : ${{ inputs.secret_value }}
49- run : |
50- pipenv run python3 encrypt_using_libnacl.py
51- - name : create or update repository secret
52- env :
53- organization : ${{ inputs.organization }}
54- secret_name : ${{ inputs.secret_name }}
55- ENCRYPTED_SECRET : ${{ env.ENCRYPTED_SECRET }}
56- REPOSITORY_PUBLIC_KEY_ID : ${{ env.REPOSITORY_PUBLIC_KEY_ID }}
57- GH_TOKEN : ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
58- run : |
59- pipenv run python3 create_or_update_repo_secret.py
60- - name : Completed
61- run : |
62- echo "program completed successfully"
63-
26+ - name : git checkout
27+ uses : actions/checkout@v4
28+ - name : Set up Python
29+ uses : actions/setup-python@v2
30+ with :
31+ python-version : ' 3.11'
32+ - name : package installations
33+ run : |
34+ pip install pipenv
35+ pipenv install
36+ - name : get public key
37+ id : get-public-key
38+ env :
39+ GH_TOKEN : ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
40+ run : |
41+ pipenv run python3 get_repository_public_key --organization ${{ inputs.organization }} \
42+ --repository_name ${{ inputs.repository_name }}
43+ - name : Encrypt secret
44+ id : encrypt-secret
45+ env :
46+ REPOSITORY_PUBLIC_KEY : ${{ env.REPOSITORY_PUBLIC_KEY }}
47+ SECRET_VALUE : ${{ inputs.secret_value }}
48+ run : |
49+ pipenv run python3 encrypt_using_libnacl.py
50+ - name : create or update repository secret
51+ env :
52+ organization : ${{ inputs.organization }}
53+ secret_name : ${{ inputs.secret_name }}
54+ ENCRYPTED_SECRET : ${{ env.ENCRYPTED_SECRET }}
55+ REPOSITORY_PUBLIC_KEY_ID : ${{ env.REPOSITORY_PUBLIC_KEY_ID }}
56+ GH_TOKEN : ${{ secrets.DEVWITHKRISHNA_PERSONAL_ACCESS_TOKEN }}
57+ run : |
58+ pipenv run python3 create_or_update_repo_secret.py
59+ - name : Completed
60+ run : |
61+ echo "program completed successfully"
0 commit comments