Michelle Duke
I'm a Content Producer working in tech & innovation. Known as the “Hackathon Queen” 👑 I'm on the GitHub DevRel team and love sharing stories from our amazing community of developers.
GitHub Actions allows you to automate your workflow. Connect with the tools you know and love, and have more freedom to innovate and be creative. With GitHub Actions, you can…
GitHub Actions allows you to automate your workflow. Connect with the tools you know and love, and have more freedom to innovate and be creative. With GitHub Actions, you can deploy to any cloud, build containers, automate messages, and do so much more. It’s time to take control!
There’s lots of amazing Actions being built every day. We spoke to some of the coolest developers building the latest Actions. Over the next few weeks we’ll be sharing their stories with lots of tips to inspire you in creating your own Actions. This week, we have Adam Dobrawy (@ad-m), the creator of GitHub Push. Read on to learn about their project, challenges, and the lessons they learned.
Adam has always been passionate about computer science from a young age. Like many developers and coders out there, he combined his passion for technology with other areas of interest:
“During high school, I combined my love of computer science with social activism when I began to work towards my goal of increasing transparency in public administration and ensuring the right of access to information in government control. I started with the Watchdog Polska Civic Network Association and developed numerous open source projects allowing us to scale operations and influence administrations in many areas.”
By creating these cool projects and working on things he loved, Adam was able to develop numerous open source projects. He tells us he loves to use GitHub to make programming faster and easier.
“GitHub allowed us to engage volunteers who got involved in the development of our tools. I’m currently developing HyperOne, a Polish cloud services platform, and I often use GitHub because it makes the development of programming tools faster and simpler.”
GitHub has lots of amazing ways to help developers work better together. Now with GitHub Actions, developers have more power than ever before to take control of their programming. The Action Adam built – GitHub Push – commits changes directly to a Git repository. Before having this Action, Adam tells us he used to have to do this manually and it was “hard to maintain long term”:
“Committing changes directly to a Git repository after running code] requires a virtual machine, as well as integrating SSH keys and cron tasks. A virtual machine is infrastructure whichand requires maintenance, monitoring, and updating. For smaller tasks, the cost of administration is generally higher than the value provided by the task. Required dependencies for this kind of scripts are easy to overlook when upgrading the operating system.”
Adam wanted something to reduce this load and ensure these commits weren’t dependent on a virtual machine, along with all the admin costs of maintaining a virtual server. He says he found the answer in GitHub Actions!:
“Thanks to the GITHUB_TOKEN provided in the repository, the integration of both solutions is trivial and the CI system doesn’t require a virtual machine, so the total cost of operation is low.”
Having low operating costs is always a win-win! The Action also ensures any information generated by the script is saved and can be used for other purposes. Each day, Adam archives the changes as commits and has them automatically generated in his documentation. The Action is also connected to Asana – the task scheduling system. When the documentation is automatically updated, a new task is created in Asana. This task is then assigned to the relevant department so those people can review the changes relevant to their work. Pretty neat how an Action can simply ensure everyone is kept up to date!
And that’s not all. Adam says his Action doesn’t just work on a daily basis, it also completes tasks weekly. Each week, as changes are made in the documentation, another script generates a new commit. This commit has attached the relevant version of the SDK. The whole process is placed in a repository for easy access. Adam says this way developers see everything they need to:
“The developer does not have to do anything to use the new functionalities – library updates are automatically prepared in GitHub Actions and the new commits are published.”
Power back to the devs! Adam loves the way GitHub Actions can be used to easily execute tasks like this so no important information is missed:
“GitHub Actions is an effective solution for such tasks. Workflow configuration contains a full description of the environment necessary for the script to work, so I don’t have to worry about updating the system or worry about losing dependency during that. GitHub provides excellent integration without having to manually copy any tokens, passwords, generate SSH keys or periodic changes to secure integration, so starting a new type of script is easy. GitHub notifications provide effective monitoring when something goes wrong and the script fails. Logs for any task execution are available for everyone, just in case.”
Adam certainly has created one awesome Action. We wanted to know if Adam had any future plans for GitHub Push or even any other plans for more Actions. He tell us that for GitHub Push, there are no plans for any “significant changes:
“The campaign was well received by the community and I intend to provide its support. Ultimately, however, the community and its needs will determine its final shape. Actions in GitHub Actions is a very smart solution because enabling everyone to create actions provides the ability to easily create a lot of integration around GitHub Actions. I intend to develop further solutions. For the needs of the cloud services platform that I am developing I intend to: – facilitate the users of continuous deployment to our serverless hosting service for NodeJS and Python applications, – enable users to create “preview apps” for pull requests, that is, to create a completely new, isolated infrastructure (servers, databases, applications) for the needs of its reviews, and after closing pull request remove them.”
Keep an eye out as Adam developments more Actions!
Like lots of great experiences and awesome projects, everyone runs into a challenge or two. Adam tells us the biggest challenge he faced when building GitHub Push was the build time:
“The time-consuming element for GitHub Push is the build time. GitHub Push uses a lot of build minutes and there is no cache. It was surprising to me and I took the time to look for a solution. I expected there to already be an Action to be published in the GitHub Marketplace, and that it would have a single build time. Eventually, it turned out that any of the Actions written in just pure JavaScript are executed almost immediately, which allowed us to reduce the time needed to build my action several times.”
So if you have an Action that needs lots of build time, think about writing it in JavaScript! But it’s not all doom and gloom, or even just lots of time spent looking for solutions. Adam enjoys Actions and his favourite feature is the integration with GitHub through the use of GITHUB_TOKEN:
“It opens up a lot of possibilities. It is also valuable that I have the ability to run Docker containers, which means I have the option of using any programming language whenever I need it.”
Adam finishes by telling us that yes he loves this feature of Actions, but more importantly, he loves how supportive and active the GitHub community is. He believes everyone should support one another and because of this it is “worth designing solutions in a way that is open to the cooperation of people with each other.”
So the next time you’re thinking about a project, why not think about how to build it with other people. Think about making it open source and welcoming collaboration from lots amazing developers.
We hope you enjoyed our interview with Adam Dobrawy. If you’re interested in building your own GitHub Action, get started with the Learning Lab course. You can also find GitHub Push—and hundreds of other GitHub Actions—on GitHub Marketplace.
If you want to see more Actions, check out all the Actions built for our recent GitHub Actions Hackathon.
Want to know how to take your terminal skills to the next level? Whether you’re starting out, or looking for more advanced commands, GitHub Copilot can help us explain and suggest the commands we are looking for.
As part of the GitHub for Beginners guide, learn how to improve the security of your profile and create a profile README. This will let you give your GitHub account a little more personality.
As part of the GitHub for Beginners guide, learn how to merge pull requests. This will enable you to resolve conflicts when they arise.