E1 - GitHub Actions: Write your first workflow with GitHub APIs || Beginner friendly tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024

ความคิดเห็น • 112

  • @drakhakami3828
    @drakhakami3828 ปีที่แล้ว +37

    if you are getting the following error when you run these aciton codes; Resource not accessible by integration. Following these steps may solve the problem.
    1- Go to repository "Settings".
    2- After that it will show you a left pane where you will find "Actions"
    3- Expand "Actions" tab
    4- Click on "General" under options tab.
    5- Now on new page scroll down and you will fine "Workflow Permissions"
    6- Select "Read and Write" under "Workflow Permissions".

    • @vinceb8041
      @vinceb8041 ปีที่แล้ว

      Very nice, thank you!

    • @drakhakami3828
      @drakhakami3828 ปีที่แล้ว

      welcome bro. @@vinceb8041

    • @jagmohannanaware
      @jagmohannanaware 11 หลายเดือนก่อน

      Another way of doing this is to provide explit write permission to the job for issue in the yaml file. For some reason, evern after changing the repository from public to private and back, the "Read and Write" under "Workflow Permissions" was disabled for me. Hence the "Create comment on Issue" workflow was failing for me. After reading the README, I figured that it has to do with the GITHUB_TOKEN permissions. I checked it in the "Setup Job" output and figured that, GITHUB_TOKEN has only read permission. I tried to change it in setting but did not work as it is always greyed out for me (though I am the owner of the org as well as repository). On further reading I figured out that permissions can be controlled in a fine-grained manner in the yaml file itself. I tried it out and it worked.

    • @astev52
      @astev52 หลายเดือนก่อน

      Thanks, worked for me.

  • @sukhwinder101
    @sukhwinder101 ปีที่แล้ว +4

    Whiteboarding is really good before starting topic discussion. Missed by many other well renowned content creators, Kudos to that.

  • @specthanatos
    @specthanatos 4 หลายเดือนก่อน +1

    Been browsing through Udemy courses, but this one is just way better. Fast and clear, good simple examples!

  • @cokegen
    @cokegen 11 วันที่ผ่านมา

    Thumbs up man ... good info and properly presented, I was going to tell about that 30:25 minute mark that was accelerating like hell showing where and how you were debugging the error, but somebody else of course already did. Again, thanks for taking the time to do this, it's really appreciated.

  • @abedalrawas2656
    @abedalrawas2656 2 ปีที่แล้ว +13

    This was very well articulated and packed with information. Crystal clear.Thank you!

  • @JARVIS-CHEN
    @JARVIS-CHEN 2 หลายเดือนก่อน

    really thankful, it is really helpful to a graduate who really want some hands-on experience in real industry

  • @GautamKhatter
    @GautamKhatter 11 หลายเดือนก่อน +2

    Your intro music really motivated me. This is the first time I was so excited for a coding video.

  • @hassansalem7605
    @hassansalem7605 3 ปีที่แล้ว +6

    I think this will be a great and very useful series.
    I really would like to learn how we can run a single job if it failed, instead of running the whole thing from scratch. Of course if that is possible, and if it is not possible, why not?🤔.
    And really thanks for sharing the knowledge

    • @glich.stream
      @glich.stream  3 ปีที่แล้ว +1

      Unfortunately that’s a feature that’s not available at the moment. I’m sure it will come at some point in the future!

  • @s7acktrac35
    @s7acktrac35 7 หลายเดือนก่อน +1

    Awesome job here - really appreciate it. You're a wonderful instructor.

  • @matheusvinicius3016
    @matheusvinicius3016 6 วันที่ผ่านมา

    great vídeo

  • @et4493
    @et4493 ปีที่แล้ว +1

    I actually appreciate you getting deeper into it!

  • @anthonyhaddad5630
    @anthonyhaddad5630 3 ปีที่แล้ว +2

    Been waiting for this series
    Thank you Bassem!

    • @glich.stream
      @glich.stream  3 ปีที่แล้ว

      I hope it will not disappoint! Thank you for your support Anthony

  • @onticmix
    @onticmix 2 ปีที่แล้ว +15

    Why wouldn't you show how you debugged the error? When someone is following along it is rather frustrating to see a time-lapse and "magic" it works. At least tell us what you did to fix the errors. I caught a few of them but keep getting a "You have an error in your yaml syntax on line 31". Thanks for taking the time to put something like this together though.

    • @glich.stream
      @glich.stream  2 ปีที่แล้ว +10

      You're right, my apologies for that. I'll make sure to avoid this in future videos. Here is a gist with the code that should be working: gist.github.com/Link-/f817f7523a3ac5de6861efd7be6bc3fb

    • @onticmix
      @onticmix 2 ปีที่แล้ว +1

      @@glich.stream Thank you, much appreciated!

    • @prashanth-5429
      @prashanth-5429 ปีที่แล้ว +8

      27:33 Missed closing the curly brace, hence it didn't work.

  • @harpritkaur-1392
    @harpritkaur-1392 4 หลายเดือนก่อน

    Would have wanted to know what caused the error and how you resolved it in the end. Specially for people like me who like to code along :)
    Thank you for the video, psyched for the rest of the videos in the series too!

    • @oddjob62
      @oddjob62 3 หลายเดือนก่อน +1

      In the api call he had /repo/ when it should have been /repos/ and he missed the } after ISSUE_NUMBER

  • @a-e-sthetic
    @a-e-sthetic 5 หลายเดือนก่อน +1

    Why am i not understanding this video 😢? Im beginner actually.. so what pre-requisites needed for me to understand github actions?

  • @bokistotel
    @bokistotel ปีที่แล้ว +4

    If someone gets " Resource not accessible by integration! " error when using auto-generating comment, it means your permissions are not right. You can add in comments-with-action: permissions: write-all

    • @MarconiPoveda
      @MarconiPoveda ปีที่แล้ว

      I was about to post this. Glad you got it.

    • @glich.stream
      @glich.stream  ปีที่แล้ว +2

      Thank you! When these videos were made GITHUB_TOKEN permissions had shipped slightly earlier and was not being enforced yet. This series needs an update 😔

  • @salborough2
    @salborough2 9 หลายเดือนก่อน

    This video was brilliant and so well presented - thank you so much :)

  • @glich.stream
    @glich.stream  2 ปีที่แล้ว +7

    1. Full course playlist:
    th-cam.com/play/PLArH6NjfKsUhvGHrpag7SuPumMzQRhUKY.html
    2. This is the gist (contains updates) with the working code from the demo:
    gist.github.com/Link-/f817f7523a3ac5de6861efd7be6bc3fb
    3. This demo is designed to work for repositories owned by organizations. If you create a repository owned by your GitHub profile it will not work and you will get errors. I encourage you to create a GitHub organization for free and a public repository in that organization to test.

  • @Vityashortsstudio
    @Vityashortsstudio ปีที่แล้ว +1

    Aug 2023 - for me worked v2 for comment + added permissions: write-all

  • @GidiBaum
    @GidiBaum ปีที่แล้ว

    👍Very nice explanation, Greeting from Haifa

  • @mikhailgoussarov4663
    @mikhailgoussarov4663 9 หลายเดือนก่อน

    Very good video, in my opinion you sometimes zoom a little too much on the buttons you are trying to explain. But that is just a personal opinion. Keep the good work!

  • @matthewheimerdinger9118
    @matthewheimerdinger9118 ปีที่แล้ว

    looking at the gist... ah, yeah, I was wondering if the organisation/organization thing was going to be a problem. Hooray, English! =D

  • @lyndondallas8523
    @lyndondallas8523 2 ปีที่แล้ว +1

    Yooooo! The intro!! get hook!

  • @yashobantadash6670
    @yashobantadash6670 8 หลายเดือนก่อน

    just awesome man! Great job

  • @sampri22
    @sampri22 4 หลายเดือนก่อน

    What is the purpose of the caracter " - " ?
    steps:
    - uses: actions/checkout@v2
    - name: hello world
    run: echo "Hello World"
    shell: bash
    Why is "name" preceded by " - " and "run" isn't?

  • @at1021
    @at1021 2 ปีที่แล้ว +2

    Thank you Bassem! :) notif on :D
    comment with api failed because of ${ISSUE_NUMBER} was missing the closing } in curl? or something else?

    • @glich.stream
      @glich.stream  2 ปีที่แล้ว +1

      Good eye! Yes, it was the closing } and in fact there were 4 other mistakes in that same curl command! If you compare the before and after you'll see them. I fast-forwarded because I didn't think anyone would be interested in the troubleshooting (it took a while)

  • @ahmedouyahya
    @ahmedouyahya 2 ปีที่แล้ว +1

    Thanks a lot, Bassem. It's very information dense.
    I laughed when I saw you testing it with: LAST LAST LAST/ LAST LAST LAST LAST LAST/ Really Last.

    • @glich.stream
      @glich.stream  2 ปีที่แล้ว +2

      😄 as it will be in the real world

  • @AromalKrishnan-oe7ub
    @AromalKrishnan-oe7ub 25 วันที่ผ่านมา

    Incredible ! small quey , runs-on: ubuntu , I would like to know , so the runner we host should have the exact os as mentioned here. ?? is it so , or , would it create a wrapper with wsl2 if we use windows runner ?

  • @lorenzopieri6716
    @lorenzopieri6716 ปีที่แล้ว

    Nice playlist and videos! Thanks for sharing :)

    • @glich.stream
      @glich.stream  ปีที่แล้ว +1

      Thank you for your support ❤️

  • @mishrajit
    @mishrajit 27 วันที่ผ่านมา

    superb.

  • @dev.22.-1
    @dev.22.-1 4 หลายเดือนก่อน

    this video is so good, thank you

  • @shuchikumari8031
    @shuchikumari8031 ปีที่แล้ว

    I’m new to GitHub actions Had some questions: 1. I want to automate the CI process where the tool I use is connected to the GitHub and there are 2 dbs After a developer pushes to one db, the second db should have the capability to pull the resources that were pushed in the first db. The tool (hosted on aws) provides a .sh file which triggers the pull for the second db. How can I connect to the aws instance from GitHub using actions and point to the aws folder and make use of the .sh file to trigger the pull. Looking forward to your expertise. Thanks a lot

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      Hi Shuchi, you workflow jobs will run on runners with an operating system, right? So start by thinking of how you would solve this problem on your own machine, then you can split the solution into 1 or more jobs and 1 or more steps! Start with a simple step that runs a bash or powershell script that does all of the work that you'd want to do, then explore other more abstracted options (like finding actions in the market you could use to do one thing or another).

  • @guohaigao2397
    @guohaigao2397 8 หลายเดือนก่อน

    Love your video. Thanks

  • @basheeral-momani2032
    @basheeral-momani2032 ปีที่แล้ว

    I think I should subscribe, thanks a lot for this in depth information

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      I'm glad this was helpful :)

  • @TanishMohanta2305
    @TanishMohanta2305 6 หลายเดือนก่อน

    go to, setting> in sidebar, actions:general>scroll to down, Workflow permissions> click on, Read and write permissions> save, now your issue part will be resolved(error in step).

  • @snehotoshbanerjee1938
    @snehotoshbanerjee1938 ปีที่แล้ว +1

    Fantastic course and content!! BTW, how to run the github api without organization (personal account). I am looking for correct URL?

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      Just replace organisation with your username and it should work.
      docs.github.com/en/rest/issues/comments#create-an-issue-comment

  • @alfredoparreira469
    @alfredoparreira469 ปีที่แล้ว

    Amazing explanation! I'm pretty sure that I will learn a lot here. Just one comment, I think could be interesting know the issue and how to solve it :)

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      I agree :) you can spot it if you compare the working code with the broken one, check the pinned comment for hints

  • @islamh6042
    @islamh6042 ปีที่แล้ว

    Thanks Bassem!

  • @saarvan
    @saarvan 7 หลายเดือนก่อน

    that's awesome..!

  • @liebespaar93
    @liebespaar93 ปีที่แล้ว

    WoW! Thank U!

  • @gaddafun
    @gaddafun 2 ปีที่แล้ว

    Nice intro!

  • @andreas-fefe
    @andreas-fefe 6 หลายเดือนก่อน

    Hey Bassem million thanks for this awesome content, can you please share your ~/.vimrc setup please ?

  • @jatinnandwani6678
    @jatinnandwani6678 8 หลายเดือนก่อน

    Thanks Man!

    • @glich.stream
      @glich.stream  8 หลายเดือนก่อน

      ❤️❤️ thank you!!

  • @culeforever5408
    @culeforever5408 ปีที่แล้ว

    great video. learnt a lot.

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      Happy to hear that 🙇‍♂️

  • @sweeeenay
    @sweeeenay 7 หลายเดือนก่อน

    Um what did you fix at the end there? For some reason my video keeps fast forwarding? I'm also getting the error you were getting but cannot see how to fix it?

    • @glich.stream
      @glich.stream  7 หลายเดือนก่อน

      Check the pinned comment

  • @djamel_sebbagh
    @djamel_sebbagh 2 ปีที่แล้ว +1

    Thank you,
    Which terminal do you use?

  • @janmajaykumar131
    @janmajaykumar131 9 หลายเดือนก่อน

    How to write a workflow to change a latex to pdf on github?

  • @basheeral-momani2032
    @basheeral-momani2032 ปีที่แล้ว

    I have a question (I just went through the video again)
    for the first workflow action 14:52
    was it necessary to use checkout action? will it work if we didn't used it?

    • @glich.stream
      @glich.stream  ปีที่แล้ว +1

      For this particular workflow, a checkout of the repository is not necessary!

  • @faisalakml
    @faisalakml 5 หลายเดือนก่อน

    can be in jobs test run more than "npm run ..." sir?

  • @dinaelgendy1518
    @dinaelgendy1518 2 ปีที่แล้ว

    Thank you Bassem.
    I am getting a strange error for the last part "gh: Not Found (HTTP 404)". even when I took your exact file as is. Any idea what may be the issue?

    • @glich.stream
      @glich.stream  2 ปีที่แล้ว

      Hey Dina, this demo was designed for repositories within organizations. If you're trying this out on a repository owned by your personal GitHub profile you will get the errors you're seeing.
      Try to create a GitHub organization (it's free) and create a repository in the organization and then test again.

    • @dinaelgendy1518
      @dinaelgendy1518 2 ปีที่แล้ว +1

      @@glich.stream Thanks a lot Bassem. It works now.

    • @sampri22
      @sampri22 4 หลายเดือนก่อน

      @@glich.stream hi, I have the same issue. I created an organization, but the error is still the same. can you cooment why?

  • @Kishore-bc2wp
    @Kishore-bc2wp ปีที่แล้ว

    how to properly format yaml, i was struggling with vim, no proper formatting

    • @glich.stream
      @glich.stream  ปีที่แล้ว +1

      For VScode GitHub has published a GitHub actions extension that does linting, you can then install any yaml formatter and you’re good.

  • @thepresistence5935
    @thepresistence5935 ปีที่แล้ว

    What keyboard are you using? Sounds looks so much awesome I want ititttttttttttttttttttttttttttttttttttttttttttt

    • @glich.stream
      @glich.stream  ปีที่แล้ว +1

      Keychron K6 with cherry brown switches. Quite affordable and good

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      Also, this is all the gear i use:
      th-cam.com/video/BGCbI-SKQio/w-d-xo.html

    • @thepresistence5935
      @thepresistence5935 ปีที่แล้ว

      @@glich.stream Thanks I will look into it.

  • @prashanth-5429
    @prashanth-5429 ปีที่แล้ว +1

    27:33 Missed closing the curly brace, hence it didn't work.

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      There were a number of issues, check the pinned comment for the gist containing the correct workflow

  • @urizen959
    @urizen959 8 หลายเดือนก่อน

    Good video but towards the end pretty sure most of us had errors with the API side but skipped on your process on how you fixed it. that's not really nice

    • @glich.stream
      @glich.stream  8 หลายเดือนก่อน +1

      This was my first video, ever 😄 the point of it was to be a walkthrough of Actions not a follow-along. Check the comments above for the corrected code

  • @mhasancoder
    @mhasancoder 2 ปีที่แล้ว

    The effort you put in this video is effortless ❤

  • @SrinivasReddy-go1mb
    @SrinivasReddy-go1mb ปีที่แล้ว

    How do i make a comment on issue with file attached

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      AFAIK The API does not support uploading attachments to issue

  • @6957-c5k
    @6957-c5k 5 หลายเดือนก่อน +1

    So when you had an issue, you fast-forwarded the lesson.🤕

  • @mrlectus
    @mrlectus ปีที่แล้ว

    How did this guy go from hello world to creating comment?

  • @fabtjar
    @fabtjar ปีที่แล้ว

    Why did the final action fail?

  • @omarPhd8
    @omarPhd8 2 ปีที่แล้ว

    What are prerequisites?

    • @glich.stream
      @glich.stream  2 ปีที่แล้ว

      For following along? You should be familiar with GitHub and have built a couple of applications before. That’s it :)

  • @snowden-IT
    @snowden-IT ปีที่แล้ว

    السلام عليكم شرح جميل ولاكن المشكله اغلب شرحك انكلش نرجوك ان يكون شرح عربي

    • @glich.stream
      @glich.stream  ปีที่แล้ว +1

      في قنوات كثيرة تقدم مواد عربيّة، في الوقت الحالي ما عندي وقت لتحضير الشروحات في عدة لغات. عم اشتغل على تحضير ترجمة للفيديوهات قريباً

  • @abdellatifbenzzine7328
    @abdellatifbenzzine7328 ปีที่แล้ว

    Getting error with Create Comment,, resource inaccessible .... wasted few hours debugging. when you don't take time to anticipate why could wrong with your tutorial it becomes a waste of time of a learner. Please address issues with applying what you are sharing here. Thanks

    • @glich.stream
      @glich.stream  ปีที่แล้ว

      Thank you for the feedback. Thousands of folks have completed this tutorial successfully (which was not designed to be a follow along). I bet you didn’t pay attention to the pinned comment above.

    • @amitgoyal8760
      @amitgoyal8760 ปีที่แล้ว

      @@glich.stream I created repo in an org and kept it public and using the exact same code
      Still facing error 😭😭
      Dk how to fix it ;-;

  • @arwamais
    @arwamais 2 ปีที่แล้ว

    Please tell me you are Lebanese…

    • @glich.stream
      @glich.stream  2 ปีที่แล้ว +1

      :) I am

    • @arwamais
      @arwamais 2 ปีที่แล้ว

      @@glich.stream hello from chtaura!

    • @glich.stream
      @glich.stream  2 ปีที่แล้ว

      @@arwamais 👋👋