Absolutely blown away by your educational content, Raghav! 🚀 Clear explanations, well-chosen examples - making learning a breeze. Your work is expanding my knowledge. Keep the outstanding content coming! 🌟💻📚
Your video for Beginners is very useful. Helped me a lot. Step by Step explanation about YAML is marvelous. Is it possible to create more videos on this Github Actions. Interested to learn more on this.
Akash To run a Jenkins server as a Docker agent in GitHub Actions, you can use the following steps: 1. Create a Dockerfile that defines the Jenkins image. The Dockerfile should include the following steps: * Install the Jenkins server. * Install the plugins that you need. * Configure the Jenkins server. 2. Build the Docker image. 3. Create a GitHub Actions workflow file. The workflow file should include the following steps: * Create a Docker agent. * Run the Jenkins job. Here is an example of a Dockerfile that defines a Jenkins image: ``` FROM jenkins/jenkins:latest RUN apt-get update && apt-get install -y git RUN jenkins-plugin-cli install greenballs ``` Here is an example of a GitHub Actions workflow file that runs a Jenkins job: ``` name: Run Jenkins job on: push: branches: - main jobs: build: runs-on: ubuntu-latest steps: - uses: docker/setup-agent@v2 - name: Run Jenkins job run: | docker run -it --rm \ -v jenkins_home:/var/jenkins_home \ jenkins/jenkins:latest \ /bin/bash -c "jenkins -s" ``` This workflow file will create a Docker agent, run the Jenkins job, and then delete the Docker agent. I hope this helps
Thank you. Your videos always helps to understand in easy and better way. Can you please create more content on this topic...Github actions for devops.
Hi Ragav In my organisation i was asked to minimise the execution time of the workflow jobs in github actions. Eg. Our github actions are taking 45 mins to complete the total jobs. If I am able to complete within 30mins its a big achievement. How can i achieve it?
Divikarthik Let's break down the problem step by step to minimize the execution time of workflow jobs in GitHub Actions. Step 1: Identify the current bottleneck * Review the GitHub Actions workflow logs to identify which jobs are taking the most time to complete * Look for jobs with long execution times, and note the specific steps or commands that are causing the delay Step 2: Optimize job parallelization * Check if the workflow is running multiple jobs in sequence. If so, consider parallelizing them using GitHub Actions' built-in parallelization feature * Use the `jobs..strategy.matrix` syntax to run multiple jobs concurrently, reducing the overall execution time Step 3: Improve caching * Check if your workflow is re-running expensive operations or re-downloading dependencies on each run * Implement caching for dependencies, such as npm or pip packages, using GitHub Actions' cache feature * Use the `actions/cache` action to store and retrieve cached dependencies Step 4: Optimize resource utilization * Review the workflow's resource usage, such as CPU, memory, and disk space * Consider upgrading the GitHub Actions runner to a more powerful machine type, if possible * Optimize the workflow to use resources more efficiently, such as by reducing the number of concurrent tasks or using more efficient algorithms Step 5: Reduce unnecessary steps * Review the workflow's steps and remove any unnecessary or redundant operations * Simplify the workflow by combining steps or eliminating unnecessary dependencies Step 6: Leverage GitHub Actions' built-in optimizations * Use GitHub Actions' built-in features, such as `continue-on-error` and `timeout`, to optimize job execution * Set reasonable timeouts for jobs to prevent them from running indefinitely Step 7: Monitor and analyze workflow performance * Use GitHub Actions' built-in metrics and analytics to monitor workflow performance * Identify trends and patterns in workflow execution times to optimize further Step 8: Implement incremental improvements * Implement small, incremental changes to the workflow and measure their impact on execution time * Continue to iterate and refine the workflow until the desired execution time of 30 minutes is achieved By following these steps, you should be able to identify areas for improvement and optimize your GitHub Actions workflow to reduce the execution time to 30 minutes or less --
im add 2 test syntax on my package json like: test-register : "npx cypress run register" test-login : "npx cypress run login" how to run both of that on git action yaml? im using && but failed on jobs
Akmal To run multiple commands sequentially in a GitHub Actions workflow YAML, you can use the `run` attribute with a pipe (`|`) to chain the commands together. Let's create a workflow that executes both your `test-register` and `test-login` commands: ```yaml name: Cypress Tests on: push: branches: - main # Adjust this to your branch name jobs: cypress_tests: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Install dependencies run: npm install # Replace with your package manager command - name: Run Cypress tests run: | npx cypress run register npx cypress run login ``` Here's what each section does: 1. Checkout code: Fetches your repository code. 2. Install dependencies: Installs the necessary dependencies (you can replace this with your actual package manager command). 3. Run Cypress tests: Executes both `npx cypress run register` and `npx cypress run login` sequentially. Make sure to adjust the branch name in the `on` section to match your desired trigger. If you encounter any issues, double-check your package.json scripts and ensure that the Cypress commands are correctly configured.
Sourabh There are a few possible reasons why your GitHub Actions workflow may not be starting: * The workflow may be misconfigured. For example, the workflow may be missing a required trigger or event. * The workflow may be referring to a repository that does not exist. * The workflow may be referring to a branch or tag that does not exist. * The workflow may be referring to a file that does not exist. * The workflow may be trying to access a resource that is not available. To troubleshoot the issue, you can try the following: * Check the workflow configuration for errors. * Make sure that the workflow is referring to the correct repository, branch, tag, and file. * Make sure that the workflow is not trying to access any resources that are not available. * If you are still having problems, you can try asking for help on the GitHub Actions forum or Slack channel. In the meantime, you can try manually triggering the workflow by clicking the "Run workflow" button on the GitHub Actions tab. I hope this helps
Hi Rekha, To make your project available online after deploying through Github Actions, you need to host your application on a web server or a cloud platform that supports your application's stack. Here are the general steps to do this: Choose a hosting provider: There are many hosting providers available that support various application stacks. Some popular options are Amazon Web Services (AWS), Google Cloud Platform (GCP), Microsoft Azure, Heroku, and Netlify. Choose a provider that supports your application's stack and fits your requirements. Create an account and set up your project: Follow the provider's instructions to create an account and set up your project. This usually involves creating a new instance or server, configuring security settings, and connecting to your Github repository. Deploy your application: Depending on the provider, there are different ways to deploy your application. Some providers support automatic deployment from Github, where your application is automatically deployed to the server after every commit. Others require manual deployment through a command-line interface or a web interface. Follow the provider's instructions to deploy your application. Configure your DNS settings: Once your application is deployed, you need to configure your DNS settings to point to your server. This involves creating a DNS record that maps your domain name to your server's IP address. The specific steps depend on your domain registrar and hosting provider. Test your application: After configuring your DNS settings, test your application to make sure it's available online. You can do this by visiting your domain name in a web browser. Overall, the process of making your project available online after deploying through Github Actions involves deploying your application to a web server or a cloud platform and configuring your DNS settings to point to your server. The specific steps depend on the hosting provider you choose and your application's stack
You are a saviour Raghav! Cannot thank you enough for your lectures and knowledge sharing, A big big Thanks 👍
Most welcome Dhruv
I just paused the video to say, that you are excelent, you explain really well the concepts behind this things, keep up my friend
So happy and humbled to see this.. thanks a lot
This is a very good introduction lesson for GitHub Actions. Good job.
Thanks a lot Samson
Absolutely blown away by your educational content, Raghav! 🚀 Clear explanations, well-chosen examples - making learning a breeze. Your work is expanding my knowledge. Keep the outstanding content coming! 🌟💻📚
Thanks Ivan
It was a nice video with very simple and well understood explanation. I was expecting more videos of github actions with more use cases.
Glad it was helpful Serat. will plan to add more lectures
Very good presentation Raghav !👏
Thanks Dimche
Thanks a lot @Raghav for starting up this series 😊 excited for it.
Most welcome Sarang
Very good video for Github Actions beginner. Nice Explanation. Thank you.
Most welcome Sreeharsha
Your video for Beginners is very useful. Helped me a lot. Step by Step explanation about YAML is marvelous. Is it possible to create more videos on this Github Actions. Interested to learn more on this.
Thanks Vijai
Great, concise and informative video for the absolute beginners like me. Thankyou for the video!
You're very welcome Zeerak
Thanks..that was so simple and lucid Sir
You are welcome Monotosh
Crystal clear explanation. Thank you. 👍
Glad it was helpful David
Another great video. Many thanks Raghav.
Most welcome
Your lectures are easy to learn sir.. Thank you 🙏
Always welcome
Very clearly explained sir !!!
Glad to hear that Zainul
Very detailed out in your presentation...Thanks
Very Very much confused Released pipeline set-up for Azure if you got a chance to make video thx
I will check on that Dharmendra
We run Jenkins server as docker agent, then in Github action how will we do that? Bit confused
Akash
To run a Jenkins server as a Docker agent in GitHub Actions, you can use the following steps:
1. Create a Dockerfile that defines the Jenkins image. The Dockerfile should include the following steps:
* Install the Jenkins server.
* Install the plugins that you need.
* Configure the Jenkins server.
2. Build the Docker image.
3. Create a GitHub Actions workflow file. The workflow file should include the following steps:
* Create a Docker agent.
* Run the Jenkins job.
Here is an example of a Dockerfile that defines a Jenkins image:
```
FROM jenkins/jenkins:latest
RUN apt-get update && apt-get install -y git
RUN jenkins-plugin-cli install greenballs
```
Here is an example of a GitHub Actions workflow file that runs a Jenkins job:
```
name: Run Jenkins job
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-agent@v2
- name: Run Jenkins job
run: |
docker run -it --rm \
-v jenkins_home:/var/jenkins_home \
jenkins/jenkins:latest \
/bin/bash -c "jenkins -s"
```
This workflow file will create a Docker agent, run the Jenkins job, and then delete the Docker agent.
I hope this helps
Thanks for wonderful video. Your video is helped me on github actions stage 1. Thanks a lot! Please make more videos on this topica step by step
Sure Venkatesh
Great video, it really demystified GitHub Actions for me!
Great to know this
Thank you. What about advance workflows. Do you have more of this? Also how to see/check event is triggered once code is pushed.
will add more on this Nilam
Loved it ! Thanks Raghav :)
Thanks
Thanks for the video. Please make a project video to deploy the github action on AWS of a simple webpage
I will plan
Thank you. Your videos always helps to understand in easy and better way. Can you please create more content on this topic...Github actions for devops.
Yes I will plan for it Aditi, the basics are covered here, Let me know what more topics do you need to see
thats a really nice tutorial
Thanks a lot Manish
Nice explanation
Thanks and welcome
Hi @Raghav, fantastic explanation. Is there any continuation tutorial available for this GitHub Actions?
Hi Prem, not for now, I created this for beginners to get started with GitHub Actions
@@RaghavPal But it was wonderful. It would be helpful if you continue so..
Yes, I will do more sessions on this. You can suggest the topics Prem
Great explanation, thank you!
You are welcome!
Awesome as usual. Thanks a lot
Most welcome
Thank you somuch sir
Most welcome Amarnatha
thankyou, good one
You're welcome Dhanya
Great
Thanks Imalka
Hi Ragav
In my organisation i was asked to minimise the execution time of the workflow jobs in github actions. Eg. Our github actions are taking 45 mins to complete the total jobs. If I am able to complete within 30mins its a big achievement.
How can i achieve it?
Divikarthik
Let's break down the problem step by step to minimize the execution time of workflow jobs in GitHub Actions.
Step 1: Identify the current bottleneck
* Review the GitHub Actions workflow logs to identify which jobs are taking the most time to complete
* Look for jobs with long execution times, and note the specific steps or commands that are causing the delay
Step 2: Optimize job parallelization
* Check if the workflow is running multiple jobs in sequence. If so, consider parallelizing them using GitHub Actions' built-in parallelization feature
* Use the `jobs..strategy.matrix` syntax to run multiple jobs concurrently, reducing the overall execution time
Step 3: Improve caching
* Check if your workflow is re-running expensive operations or re-downloading dependencies on each run
* Implement caching for dependencies, such as npm or pip packages, using GitHub Actions' cache feature
* Use the `actions/cache` action to store and retrieve cached dependencies
Step 4: Optimize resource utilization
* Review the workflow's resource usage, such as CPU, memory, and disk space
* Consider upgrading the GitHub Actions runner to a more powerful machine type, if possible
* Optimize the workflow to use resources more efficiently, such as by reducing the number of concurrent tasks or using more efficient algorithms
Step 5: Reduce unnecessary steps
* Review the workflow's steps and remove any unnecessary or redundant operations
* Simplify the workflow by combining steps or eliminating unnecessary dependencies
Step 6: Leverage GitHub Actions' built-in optimizations
* Use GitHub Actions' built-in features, such as `continue-on-error` and `timeout`, to optimize job execution
* Set reasonable timeouts for jobs to prevent them from running indefinitely
Step 7: Monitor and analyze workflow performance
* Use GitHub Actions' built-in metrics and analytics to monitor workflow performance
* Identify trends and patterns in workflow execution times to optimize further
Step 8: Implement incremental improvements
* Implement small, incremental changes to the workflow and measure their impact on execution time
* Continue to iterate and refine the workflow until the desired execution time of 30 minutes is achieved
By following these steps, you should be able to identify areas for improvement and optimize your GitHub Actions workflow to reduce the execution time to 30 minutes or less
--
@@RaghavPal Thanks Raghav
Nice
Thanks
im add 2 test syntax on my package json like:
test-register : "npx cypress run register"
test-login : "npx cypress run login"
how to run both of that on git action yaml? im using && but failed on jobs
Akmal
To run multiple commands sequentially in a GitHub Actions workflow YAML, you can use the `run` attribute with a pipe (`|`) to chain the commands together. Let's create a workflow that executes both your `test-register` and `test-login` commands:
```yaml
name: Cypress Tests
on:
push:
branches:
- main # Adjust this to your branch name
jobs:
cypress_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: npm install # Replace with your package manager command
- name: Run Cypress tests
run: |
npx cypress run register
npx cypress run login
```
Here's what each section does:
1. Checkout code: Fetches your repository code.
2. Install dependencies: Installs the necessary dependencies (you can replace this with your actual package manager command).
3. Run Cypress tests: Executes both `npx cypress run register` and `npx cypress run login` sequentially.
Make sure to adjust the branch name in the `on` section to match your desired trigger. If you encounter any issues, double-check your package.json scripts and ensure that the Cypress commands are correctly configured.
Thank you
You're welcome Nancy
Sir can you please come up with Github Actions real interview questions?
I will do Akash
i creeated the action created my workflow then commited action are not started
Sourabh
There are a few possible reasons why your GitHub Actions workflow may not be starting:
* The workflow may be misconfigured. For example, the workflow may be missing a required trigger or event.
* The workflow may be referring to a repository that does not exist.
* The workflow may be referring to a branch or tag that does not exist.
* The workflow may be referring to a file that does not exist.
* The workflow may be trying to access a resource that is not available.
To troubleshoot the issue, you can try the following:
* Check the workflow configuration for errors.
* Make sure that the workflow is referring to the correct repository, branch, tag, and file.
* Make sure that the workflow is not trying to access any resources that are not available.
* If you are still having problems, you can try asking for help on the GitHub Actions forum or Slack channel.
In the meantime, you can try manually triggering the workflow by clicking the "Run workflow" button on the GitHub Actions tab.
I hope this helps
How to make project available online after deploying through github actions
Hi Rekha,
To make your project available online after deploying through Github Actions, you need to host your application on a web server or a cloud platform that supports your application's stack. Here are the general steps to do this:
Choose a hosting provider: There are many hosting providers available that support various application stacks. Some popular options are Amazon Web Services (AWS), Google Cloud Platform (GCP), Microsoft Azure, Heroku, and Netlify. Choose a provider that supports your application's stack and fits your requirements.
Create an account and set up your project: Follow the provider's instructions to create an account and set up your project. This usually involves creating a new instance or server, configuring security settings, and connecting to your Github repository.
Deploy your application: Depending on the provider, there are different ways to deploy your application. Some providers support automatic deployment from Github, where your application is automatically deployed to the server after every commit. Others require manual deployment through a command-line interface or a web interface. Follow the provider's instructions to deploy your application.
Configure your DNS settings: Once your application is deployed, you need to configure your DNS settings to point to your server. This involves creating a DNS record that maps your domain name to your server's IP address. The specific steps depend on your domain registrar and hosting provider.
Test your application: After configuring your DNS settings, test your application to make sure it's available online. You can do this by visiting your domain name in a web browser.
Overall, the process of making your project available online after deploying through Github Actions involves deploying your application to a web server or a cloud platform and configuring your DNS settings to point to your server. The specific steps depend on the hosting provider you choose and your application's stack
i tried to find the link of the notes, could not
Oloja
I keep all notes in the description below the video.. pls check
thank you!
You're welcome!