|
21 | 21 | run-name: ${{ github.actor }} creting or updating ${{ inputs.secret_name }} in ${{ inputs.repository_name }} |
22 | 22 | jobs: |
23 | 23 | create_or_update_repository_secrets: |
24 | | - runs-on: ubuntu-latest |
25 | | - steps: |
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" |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 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