Azure Automation and Git commands

RaKu 41 Reputation points
2024-01-04T09:46:39.5033333+00:00

hi

Is it possible to do a Git pull and Push using Azure aumation job ?
I would to use to pull a Devops repo change a value to push back to the repo

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,366 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2024-01-04T17:01:53.29+00:00

    Hi @RaKu

    Azure Automation accounts doesn't support git commands in a runbook. I did come across download-a-github-repository which is in the runbook gallery. It utilizes the GitHub REST API to download the repo and save it, so you can use that as a guide. You may be able to find an endpoint, like https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28 that fits your specific use case.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.