Run Python in GitHub Actions

Veröffentlicht am: 26 Mai 2022
auf dem Kanal: Alfredo Deza
9,421
109

Learn how to run #Python scripts on #GitHub Actions! This allows you to handle logic that might be a bit more complex, like setting conditional behavior based on results.

I'll show you how in this GitHub Actions lesson for beginners so that you can use this in your own repository easily. Example repo in the lesson resources.

Although GitHub actions is powerful as-is, it can get complicated when consuming inputs from other sources like an HTTP request providing JSON output.

Imagine a scenario where, depending on the JSON output of an HTTP request you have to do an API call. You might be able to do this with a specialized action or workflow, but with Python it might be easier.

▬▬🥇 Learning Objectives ▬▬

🚀 How to run a Python script with GitHub Actions
🚀 Create a Python script that can be executed from an Action
🚀 Consume Action Secrets in the Python script
🚀 Explore other ways to install dependencies if needed

▬▬ C H A P T E R S ⏰ ▬▬

00:00 Introduction
00:53 Add an action workflow file
04:25 Add a Python file
05:51 Test the GitHub Action
07:56 Add a repository secret
09:11 Use the GitHub secret in Python
11:35 Add environment var to a step

▬▬ 🔗 R E S O U R C E S ▬▬

GitHub repository with sample code → https://github.com/alfredodeza/python...
Minimal Python book → https://www.amazon.com/Minimal-Python...
Free Azure Certification for Students → https://docs.microsoft.com/learn/cert...
Python for Beginners Learn Path → https://docs.microsoft.com/learn/path...


Auf dieser Seite können Sie das Online-Video Run Python in GitHub Actions mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Alfredo Deza 26 Mai 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 9,421 Mal angesehen und es wurde von 109 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!