DEV Community

Cover image for Sokoban Action
Darshan Sen
Darshan Sen

Posted on

10 6

Sokoban Action

My Workflow

Sokoban Action

Hi everyone! This is the first time I'm making a GitHub Action and this is also my first post here!

When I came to know about the GitHub Actions Hackathon, I had no idea what an Action was or how it worked. As I was scrolling through the comments of the Hackathon Announcement post, I came across this:

I'm looking forward to seeing what the community comes up with for this contest across all categories, but especially for Wacky Wildcards. You can get pretty dang creative here. I'm a fan of this Profile Readme where you can actually play chess (powered by GitHub Actions).

So, I visited the link and found this amazing project!

Tim's Community Chess Tournament

Game is in progress. This is open to ANYONE to play the next move. That's the point. 👋 It's your turn! Move a black (solid) piece.

A B C D E F G H
8
7
6
5
4
3
2
1

BLACK (solid): It's your move... to choose where to move...

FROM TO - just click one of the links :)
A7 A5 , A6
B7 B5 , B6
B8 A6 , C6 , D7
C8 D7 , E6 , F5 , G4 , H3
D8 A5 , B6 , C7 , D7
E7 E5 , E6
E8 D7
F6 D5 , D7 , E4 , G4 , G8 , H5
G7 G5 , G6
H7 H5 , H6
H8 G8

Ask a friend to take the next move: Share on Twitter...

How this works

When you click a link, it opens a GitHub Issue…

I was surprised by the capabilities of GitHub Actions. So, I went through the docs and took the awesome courses at GitHub Learning Lab to get a good grip on GitHub Actions.

Finally, I decided upon making my own game using GitHub Actions. I implemented Sokoban, which is a classic box-pushing game.

The game takes place right in the README.md. It has a table representing the game board, furnished with the game items, like this:

Game board

Your character is the Octocat. To play the game, you are supposed to push each box to a goal using the given controls.

When you click on the controls, it opens a new issue with a text to trigger the workflow. After you submit the issue, the action starts running and updates the board and replies to your issue like this:

Reply

Now push! 😃

Submission Category:

Wacky Wildcards

Yaml File or Link to Code

GitHub logo RaisinTen / sokoban-action

Sokoban game using GitHub Actions 🤖

Sokoban Action

Instructions

Sokoban is a game where you are supposed to push each box to a goal.

Items

Name Item Description
Octocat You can move me in all 4 directions with ⬆️, ⬇️, ➡️, ⬅️ and go back a move with ↩️ when you are stuck.
Box I get pushed in the direction Octocat moves. When I am pushed into a goal, I turn blue!
Goal When a box is pushed into me, it turns blue!
Wall You can't push me.

Working

GitHub Actions

This game is made using GitHub Actions! When you click on the controls, it opens a new issue with a text to trigger the workflow. After you submit the issue, the action starts running and updates the board and replies to your issue.

To know more about this, check out the blog on !

Now push! 😃

Code of Conduct

Hope you enjoyed playing this game. 😊
Thank you for your time. 🙏

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (6)

Collapse
 
paultrinankur profile image
Trinankur Paul

Awesome bro

Collapse
 
raisinten profile image
Darshan Sen

Thank you very much! ❤️

Collapse
 
shunjid profile image
Shunjid Rahman Showrov

Cool !

Collapse
 
raisinten profile image
Darshan Sen

Thank you! :)

Collapse
 
legacyftw profile image
Turbasu Chatterjee

Looks real fun haha!

Collapse
 
raisinten profile image
Darshan Sen

Thanks a lot! :)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay