cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chriss94
New Member

GitHub - Create or update a repository secret

I would really like to use this action "Create or update a repository secret".

 

I have problem with one of the input for this action called:

 

encrypted_value:

Value for your secret, encrypted with LibSodium using the public key retrieved from the Get an Repository public key action.

 

I do not know how to prepare this input on Power Automate side?

 

I found some blog on this matter, but still I do not know how to prepare this input in Power Automate side?

Blog about it is here: Creating GitHub Secrets programmatically - Philip L (philiplimbeck.dev)

 

Does anyone here have an idea how to prepare an input called encrypted_value on the power automate side for this action, is it even possible?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Chriss94
New Member

I wrote the Azure function in javascript and it solved the problem.
Encoded password I can now use to create a secret for the repository in Github using PowerAutomate "Create or update a repository secret" action.

View solution in original post

6 REPLIES 6
alaabitar
Solution Supplier
Solution Supplier

Hello,

I think what this means is that you have to call the get a repository public key 

alaabitar_0-1641898603414.png

and pass its value to the create or update a repository secret

 

Best regards,

Alaa

But i need the value for my secret to be specific, for example "password123", if i use information from "Get public key" what will be the value for my secret and how to change it with power automate?

And from what I understand, if I want the value to be "password123" i need to encrypt it with libsodium using the key value from "Get public key action", the question is how to do it with Power automate?

alaabitar
Solution Supplier
Solution Supplier

THen I would sufgest to create an azure function in powershell for example that will do the libsodium encryption that you call from power automate and set the result back to the create or update a repository secret.

I really like the idea, can you help me with that PowerShell script? I would really use your help with it. So I think that i need really simple piece of code with one input = key value which i use to encrypt my password with libsodium. I need to create PowerShell code for libsodium encryption. Can anyone help me with that?

Chriss94
New Member

I wrote the Azure function in javascript and it solved the problem.
Encoded password I can now use to create a secret for the repository in Github using PowerAutomate "Create or update a repository secret" action.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,342)