Stuck on "GitHub Actions: Write Docker container actions"?

Hi there. :wave:

I’m making this post for anyone stuck on the “Use the cat-fat action” section of the “GitHub Actions: Write Docker container actions” course.

What’s the issue? :thinking:

The issue I faced with this course is that the API they provide in the code, the cat-fact API, isn’t available anymore, thus failing the action when the pull request is labeled.

The solution. :smiley_cat:

The solution I came to too proceed with the course was to use another API instead, so for anyone stuck on that section, here’s a replacement you can use.

cat_url = "https://catfact.ninja/facts?limit=50"
r = requests.get(cat_url)
r_obj_list = r.json()["data"]

fact_list = []

for fact in r_obj_list:
    fact_list.append(fact["fact"])

Hope this will help anyone stuck on the course. :slightly_smiling_face:

Thanks for the report, @thinkverse. I opened an issue for this on the course repo.

1 Like