Skip to content

ibrahimroshdy/multi-arch-github-actions

Repository files navigation

Multi-Arch Build with GitHub Actions

Python Static Badge

pre-commit.ci status Multi-Arch GitHub Actions codecov

About

A sample project of adding continuous integration multi-arch buildx to GitHub and utilising the GitHub actions, workflows and job settings. This project contains a simple_loop.py python file that prints a progress bar of a for loop. The aim of this project to serve a sample project for implementing GitHub's workflow using workflow files, and custom actions and multiple jobs.

Folder Structure

    multi-arch-github-actions
    │
    ├── README.md
    ├── .github # gitHub workflow directory
    │     ├── actions # Custom actions directory
    │     │   └── install-run-code # This project's Custom Action to be referred to by name in workflows
    │     │       └── action.yml # Action instructions file [Must be named action]
    │     └── workflows # This project's Workflows
    │         └── ci_workflow.yml # Workflow instructions file
    ├── .gitignore # git ignore file
    ├── pyproject.toml
    └── simple_loop.py

Getting Started

There is no need to run the project locally, but in case it is needed here is the quick start instructions used. Note: Those are the same instructions in .github/workflows/ci_workflows.yml and .github/actions/install-run-code/actions.yml

Project is also setup for a Docker Multi-arch build for arm64 and amd64. Read more about it in this article.

Create a virtualenv

 virtualenv venv -p python3

Activate your venv

source venv/bin/activate

Install poetry and pyfiglet using pip

pip install poetry pyfiglet

Run poetry install to install all needed python packages

poetry install

Run pyfiglet because you can

pyfiglet Multi-Arch Build with GitHub Actions

Finally, run code

python simple_loop.py

You should have something like that..

This is a progress bar of the simple loop script
100%|███████| 1000000/1000000 [00:00<00:00, 4474649.76it/s]

About

A sample project of adding multi-arch build pipeline to GitHub and utilising the GitHub actions, workflows and job settings.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published