Skip to content

BeeToFlow is a GitHub Action for managing AlgoHive puzzle files and catalogs. It automatically compile .alghive files efficiently, providing the easisest way to build puzzles for the AlgoHive platform.

License

Notifications You must be signed in to change notification settings

AlgoHive-Coding-Puzzles/BeeToFlow

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeeToFlow

Overview

BeeToFlow is a Dockerized Python utility that is aim to compile a set of opened puzzle folders into .alghive files. This tool exists as a convenient way to use the Hivecraft tool to compile the puzzles. Includes this tool in your GitHub actions workflow to automatically compile your opened puzzles into .alghive files.

Usage

Add the following to your GitHub actions workflow:

- name: Use Compile Puzzles Action
  uses: AlgoHive-Coding-Puzzles/BeeToFlow@v1.0.0
  with:
    target-directories: "B1, B2"

Example of a GitHub Actions workflow file that uses the BeeToFlow action to compile puzzles:

name: Compile Puzzles
on: [push]
jobs:
  compile:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v3

      - name: Use Compile Puzzles Action
        uses: AlgoHive-Coding-Puzzles/BeeToFlow@v1.0.0
        with:
          target-directories: "Catalog1, Catalog2"

      - name: Upload Compiled Files as Artifactories
        uses: actions/upload-artifact@v2
        with:
          name: compiled-puzzles
          path: |
            out/Catalog1.tar
            out/Catalog2.tar
          retention-days: 7

Parameters

Parameter Description
target-directories A comma-separated list of directories to compile. Each directory should contain a set of opened puzzles.
output-directory The directory where the compiled .alghive files will be saved. Default is out.
hivecraft-version The version of Hivecraft to use. Default is latest.

Behavior

  • The action will compile the puzzles in the specified directories and save the .alghive files in the out directory.
  • If the target-directories parameter is not provided, the action will compile all opened puzzle folders in the repository.
  • The action will automatically create the out directory if it does not exist.
  • The action will use the specified version of Hivecraft to compile the puzzles. If no version is specified, it will use the latest version.
  • The action will create a tar file for each directory containing the compiled .alghive files.
  • If the action fails, it will return an error message indicating the reason for the failure.

Future Improvements

  • Add support for only testing and not compiling the puzzles.
    • It will allow users to test their commited puzzles in "draft" period and only compile them when they are ready.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

BeeToFlow is a GitHub Action for managing AlgoHive puzzle files and catalogs. It automatically compile .alghive files efficiently, providing the easisest way to build puzzles for the AlgoHive platform.

Topics

Resources

License

Stars

Watchers

Forks