{"id":38041,"date":"2019-12-19T06:00:59","date_gmt":"2019-12-19T13:00:59","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/premier-developer\/?p=38041"},"modified":"2019-12-16T09:35:35","modified_gmt":"2019-12-16T16:35:35","slug":"intro-to-github-actions","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/intro-to-github-actions\/","title":{"rendered":"Intro to GitHub Actions"},"content":{"rendered":"<p>In this post, Sr. App Dev Manager\u00a0<a href=\"https:\/\/www.linkedin.com\/in\/pkingroch\/\" target=\"_blank\" rel=\"noopener noreferrer\">Jason Giordano<\/a> shows us how to use GitHub Actions to create a very simple CI\/CD solution.<\/p>\n<hr \/>\n<p>GitHub actions makes it easy to automate all your software workflows. You can join through the link provide here: <a href=\"https:\/\/github.com\/features\/actions\">https:\/\/github.com\/features\/actions<\/a>. The general availability date was November 13, 2019. To get ready for GitHub Actions, I have created a very simple application to demonstrate the basics. When you are ready to expand your solution, refer to the documentation here: <a href=\"https:\/\/help.github.com\/en\/github\/automating-your-workflow-with-github-actions\/about-github-actions\">https:\/\/help.github.com\/en\/github\/automating-your-workflow-with-github-actions\/about-github-actions<\/a><\/p>\n<h4>Prerequisites for this walkthrough:<\/h4>\n<p>DotNet Core (2.2): <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet-core\">https:\/\/dotnet.microsoft.com\/download\/dotnet-core<\/a><\/p>\n<p>Git: <a href=\"https:\/\/git-scm.com\/downloads\">https:\/\/git-scm.com\/downloads<\/a><\/p>\n<p>GitHub Desktop: <a href=\"https:\/\/desktop.github.com\/\">https:\/\/desktop.github.com\/<\/a><\/p>\n<h4>To get started:<\/h4>\n<p>Open a Command Prompt and enter:<\/p>\n<pre class=\"lang:default decode:true\">dotnet new console -o \"Blog\"<\/pre>\n<p><img decoding=\"async\" width=\"558\" height=\"100\" class=\"wp-image-38062\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-16.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-16.jpeg 558w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-16-300x54.jpeg 300w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><\/p>\n<pre class=\"lang:default decode:true\">cd Blog\r\ndotnet run<\/pre>\n<p><img decoding=\"async\" width=\"411\" height=\"107\" class=\"wp-image-38063\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-17.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-17.jpeg 411w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-17-300x78.jpeg 300w\" sizes=\"(max-width: 411px) 100vw, 411px\" \/><\/p>\n<pre class=\"lang:default decode:true\">git init\r\ngit add .\r\ngit commit -m \"Init\"<\/pre>\n<p><img decoding=\"async\" width=\"644\" height=\"149\" class=\"wp-image-38064\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-18.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-18.jpeg 644w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-18-300x69.jpeg 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/p>\n<p>For the last step (git push), we will use the GUI to showcase another option for working with Git repositories, especially for those who prefer a user interface.<\/p>\n<p>Open GitHub Desktop (sign in to GitHub.com) and click \u201cAdd an Existing Repository from your hard drive\u2026\u201d<\/p>\n<p><img decoding=\"async\" width=\"539\" height=\"507\" class=\"wp-image-38065\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-19.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-19.jpeg 539w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-19-300x282.jpeg 300w\" sizes=\"(max-width: 539px) 100vw, 539px\" \/><\/p>\n<p>Click \u201cChoose\u2026\u201d and navigate to the \u201cBlog\u201d folder and click \u201cSelect Folder\u201d then \u201cAdd repository\u201d<\/p>\n<p><img decoding=\"async\" width=\"1116\" height=\"940\" class=\"wp-image-38066\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-20.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-20.jpeg 1116w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-20-300x253.jpeg 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-20-1024x863.jpeg 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-20-768x647.jpeg 768w\" sizes=\"(max-width: 1116px) 100vw, 1116px\" \/><\/p>\n<p>Click \u201cPublish repository\u201d<\/p>\n<p><img decoding=\"async\" width=\"990\" height=\"374\" class=\"wp-image-38067\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-21.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-21.jpeg 990w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-21-300x113.jpeg 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-21-768x290.jpeg 768w\" sizes=\"(max-width: 990px) 100vw, 990px\" \/><\/p>\n<p>Click \u201cPublish repository\u201d<\/p>\n<p><img decoding=\"async\" width=\"747\" height=\"542\" class=\"wp-image-38068\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-22.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-22.jpeg 747w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-22-300x218.jpeg 300w\" sizes=\"(max-width: 747px) 100vw, 747px\" \/><\/p>\n<p>Click the \u201cView on GitHub\u201d button<\/p>\n<p><img decoding=\"async\" width=\"988\" height=\"160\" class=\"wp-image-38069\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-23.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-23.jpeg 988w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-23-300x49.jpeg 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-23-768x124.jpeg 768w\" sizes=\"(max-width: 988px) 100vw, 988px\" \/><\/p>\n<p>Click the \u201cSet up Actions\u201d button<\/p>\n<p><img decoding=\"async\" width=\"528\" height=\"317\" class=\"wp-image-38070\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-24.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-24.jpeg 528w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-24-300x180.jpeg 300w\" sizes=\"(max-width: 528px) 100vw, 528px\" \/><\/p>\n<p>Click the \u201cSet up this workflow\u201d button<\/p>\n<p><img decoding=\"async\" width=\"439\" height=\"609\" class=\"wp-image-38071\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-25.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-25.jpeg 439w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-25-216x300.jpeg 216w\" sizes=\"(max-width: 439px) 100vw, 439px\" \/><\/p>\n<p>Click the \u201cStart commit\u201d button then the \u201cCommit new file\u201d button<\/p>\n<p><img decoding=\"async\" width=\"496\" height=\"488\" class=\"wp-image-38072\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-26.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-26.jpeg 496w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-26-300x295.jpeg 300w\" sizes=\"(max-width: 496px) 100vw, 496px\" \/><\/p>\n<p>Click the \u201cActions\u201d tab<\/p>\n<p><img decoding=\"async\" width=\"964\" height=\"623\" class=\"wp-image-38073\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-4.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-4.png 964w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-4-300x194.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-4-768x496.png 768w\" sizes=\"(max-width: 964px) 100vw, 964px\" \/><\/p>\n<p>Click \u201c.NET Core\u201d to see the automated build<\/p>\n<p><img decoding=\"async\" width=\"1095\" height=\"422\" class=\"wp-image-38074\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-27.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-27.jpeg 1095w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-27-300x116.jpeg 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-27-1024x395.jpeg 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-27-768x296.jpeg 768w\" sizes=\"(max-width: 1095px) 100vw, 1095px\" \/><\/p>\n<p>Click the \u201cCode\u201d tab<\/p>\n<p><img decoding=\"async\" width=\"848\" height=\"389\" class=\"wp-image-38075\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-5.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-5.png 848w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-5-300x138.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-5-768x352.png 768w\" sizes=\"(max-width: 848px) 100vw, 848px\" \/><\/p>\n<p>Click \u201cProgram.cs\u201d<\/p>\n<p><img decoding=\"async\" width=\"715\" height=\"331\" class=\"wp-image-38076\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-6.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-6.png 715w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-6-300x139.png 300w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/p>\n<p>Click the \u201cEdit this file\u201d icon<\/p>\n<p><img decoding=\"async\" width=\"538\" height=\"204\" class=\"wp-image-38077\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-28.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-28.jpeg 538w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-28-300x114.jpeg 300w\" sizes=\"(max-width: 538px) 100vw, 538px\" \/><\/p>\n<p>Change the text to:<\/p>\n<pre class=\"lang:default decode:true \">String sDayOfWeek = DateTime.Now.ToString(\"dddd\");\r\nConsole.WriteLine(\"Happy \" + sDayOfWeek + \"!\");<\/pre>\n<p><img decoding=\"async\" width=\"685\" height=\"423\" class=\"wp-image-38078\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-29.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-29.jpeg 685w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-29-300x185.jpeg 300w\" sizes=\"(max-width: 685px) 100vw, 685px\" \/><\/p>\n<p>Click the \u201cCommit changes\u201d button at the bottom<\/p>\n<p><img decoding=\"async\" width=\"715\" height=\"376\" class=\"wp-image-38079\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-30.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-30.jpeg 715w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-30-300x158.jpeg 300w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/p>\n<p>Click the \u201cActions\u201d tab to view the automated build process<\/p>\n<p><img decoding=\"async\" width=\"1004\" height=\"208\" class=\"wp-image-38080\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-31.jpeg\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-31.jpeg 1004w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-31-300x62.jpeg 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2019\/12\/word-image-31-768x159.jpeg 768w\" sizes=\"(max-width: 1004px) 100vw, 1004px\" \/><\/p>\n<p>This was a very simple intro to GitHub Actions, as well as some of the other tools you may use in the future. Now you are ready to apply these basic concepts to your development process and research the complex workflows available.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitHub Actions makes it easy to automate all your software workflows, now with world-class CI\/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.<\/p>\n","protected":false},"author":582,"featured_media":38070,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[35,22,1],"tags":[21,3],"class_list":["post-38041","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-alm","category-devops","category-permierdev","tag-devops","tag-team"],"acf":[],"blog_post_summary":"<p>GitHub Actions makes it easy to automate all your software workflows, now with world-class CI\/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/38041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=38041"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/38041\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/38070"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=38041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=38041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=38041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}