# Github-Action-Project

Step 1 : In this step you need to create aws ec2 instance.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691140703024/89268f9e-ef7d-43cd-a019-7bb77cd35dea.png align="center")

Step 2 : In this step you need to edit inbound rule for security group

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691140957304/7466d2a0-1c8b-4829-b4c0-a00e80c2afdf.png align="center")

Step 3 : In this step you need to edit outbound rule for security group

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691141146928/91562c84-a11b-4448-83eb-b7c6a143a75e.png align="center")

Step 4 : Then go to your github repository and commit some change and after that you will see your git hub action is running

Note: For practice you can use my github repository

[https://github.com/Shreyashbhise/github-action-demo.git](https://github.com/Shreyashbhise/github-action-demo.git)

Step 4 : Then got to the .githubworkflows repository

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691142938834/0f1cf642-b37f-47cd-800a-a40f253ed213.png align="center")

After that go to the first-action.yml and commit some chnage

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691143002323/2dfe7685-187f-4218-b0f0-f21a642771e5.png align="center")

Note : After commiting some changes you will see your github action is running

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691143063313/f61834b2-4d55-48a5-af24-6800b202bd65.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691143096812/59a62f62-4234-4c76-a5df-e809b12aeab3.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691143187102/662ef1a5-1c6f-4657-8661-bd5ff3025855.png align="center")

Note : Until now we are running this project on github hosted runner now we will reun this project on self hosted runner.

Step 5 : Then click on setting and go to the action and click on runners

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691143594472/78e8b177-0f4c-42f7-836a-4bbe3441e3ac.png align="center")

Then click on new self hosted runner

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691143639162/99520be5-fdc2-4be1-8b75-0b0f792c5741.png align="center")

Note : After that you have to select your runner ,architecture and do the configure and downloads and then your finally connected to github .

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691144352056/4d7ed8b8-2abc-4f28-a615-ebe42acdd2d3.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691144385651/4e4a34dd-65e8-4676-a28c-9a182a704968.png align="center")

Then you have to edit your yml with ubuntu-latest with self-hosted

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691144518507/254b9d21-c306-4e77-84e8-49ae14c61f83.png align="center")

github action is running you check using this yellow dot

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691144708178/82c8f625-f0eb-40b5-ae92-8fb5d79f76ed.png align="center")
