GitHub Push: Automating commits with Actions

Adam Dobrawy (@ad-m) has been building open source tools since high school, when he combined his interest in computer science with social activism. Working with the Watchdog Polska Civic Network Association, he developed projects aimed at increasing transparency in public administration and supporting the right of access to government-controlled information. That experience shaped how he approaches software development today.

“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.”

His work on HyperOne led to the creation of GitHub Push, an Action that commits changes directly to a Git repository. Before building it, Dobrawy managed this process manually, which he describes as “hard to maintain long term.” The previous approach required a virtual machine, SSH keys, and cron tasks to handle scheduled commits.

“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 which 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.”

GitHub Actions removed that administrative burden. By leveraging the built-in GITHUB_TOKEN, an Action-based solution needs no separate infrastructure, and the CI system's operating cost stays low.

Daily and weekly automation

GitHub Push runs on two schedules. Daily, it archives generated changes as commits and automatically updates documentation. Those updates are also connected to Asana: each documentation change creates a task in the scheduling system, assigned to the relevant department for review. This workflow ensures that stakeholders are notified of changes that affect their work those that need to review updated docs, or that dependency changes get reviewed before release.

On a weekly cycle, the Action generates new commits from documentation changes, attaching the corresponding SDK version to each commit. The repository containing the generated SDK updates is kept ready for developers to access. Dobrawy notes that this makes usage straightforward: “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.”

The complete environment configuration in the workflow file is what makes this approach work well over time.

“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.”

Build time and the JavaScript pivot

Dobrawy's biggest obstacle in building GitHub Push was build time. The Action consumed a large number of build minutes with no cache available. His initial expectation was that a pre-built Market Action or a single build would solve the problem. The real solution came from language choice: Actions written in pure JavaScript run almost immediately, cutting build time significantly.

Beyond performance, his favourite aspect of Actions is the deep GitHub integration via GITHUB_TOKEN. “It opens up a lot of possibilities,” he says. “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.”

Despite those technical advantages, Dobrawy emphasises the human side of GitHub. He appreciates the active and supportive community and believes that designing with collaboration in mind is worth it.

Planned Actions for HyperOne

For GitHub Push itself, Dobrawy has no major changes planned and expects the community's needs to guide its evolution. He does intend to ship more Actions around the HyperOne cloud platform. The pipeline targets three use cases:

  • Facilitating continuous deployment to HyperOne's serverless hosting for Node.js and Python applications.
  • Creating isolated "preview app" infrastructure for pull request reviews, including servers, databases, and applications, with automatic teardown when the pull request closes.

To start building, the Learning Lab course is the entry point. Published Actions are already available in the GitHub Marketplace, and the full catalogue from the recent GitHub Actions Hackathon is worth a look for ideas.