4D Blog

Home Tips How to take advantage of GitHub actions with 4D

How to take advantage of GitHub actions with 4D

September 15, 2021

Tips

Your project is now on a source control system. This means that managing several versions of your software, monitoring changes, and integrating corrections or new features is much simpler now.

Why not also take advantage of continuous integration?

Starting with 4D v19, you can launch the compilation of your project with a command. As a result, you now have all the building blocks needed to automate your integration chain.

This blog post will give you an example of automation with the GitHub manager and GitHub Actions.

What is a GitHub Action?

GitHub actions allow you to automate tasks. They are triggered by events such as a code submission.

Why GitHub Actions?

Workflow automation is a requirement in today’s software development world. Development teams use CI/CD servers to automate the continuous integration and deployment (CI/CD) processes in their software life cycle.

GitHub Actions allow users to build, test, and deliver their code directly from GitHub without using an external server such as Jenkins or TeamCity. GitHub hosts virtual machines on Linux, Windows, and macOS operating systems.

How to use GitHub Actions?

You need to create a workflow. A workflow is an automated procedure that you add to your repository. In the action tab, you can pick one from the catalog of workflows or create your own.

In this example, we use the “simple workflow” proposed by Github:

This created a script in the “.github/workflows” folder of our repository. In this script, you can define:

  • the trigger event: on push/pull/schedule
  • the OS of the virtual machine: runs-on
  • …

For more details on syntaxes and possibilities, take a look at the GitHub documentation.

blank

Next, we change the README.md file in our repository, which triggers the workflow. In the action tab, the modification is visible, the workflow is in a queue:

blank

Voilà! The script has been executed.

We now have access to the OS information, and the virtual machine used, checking if it corresponds to the configuration we requested.

All the logs of our script are now visible:

blank

Concrete example

Now that we have seen how to create and set up GitHub actions, here is a workflow created by Eric Marchand.

Eric is one of our 4D for iOS team developers. He has developed several git actions for his own use, used on a GitLab server for our private repositories and on GitHub for the public one.

Here is an example of how to compile a project and publish the release on GitHub:

First, we have a 4D project with shared code that compiles other projects passed in parameters during the launch (with a bash script on macOS runner). This project converts the compilation errors to GitHub log format. It is stored on a Github repository containing actions such as compiling, generating a release, etc. These actions can then be used in any other project.

Second, to run the project and thus call an action such as compiling, we need to run a 4D application. A 4D application is available for download on a server. It needs to be installed and run on GitHub servers. You’ll need to add the SERVER_URL key in your repository’s “Action Secret” parameter for each project.

Finally, you create workflows triggered by a pull request in your projects, which calls the “build” workflow of your “centralized action” repository.

Find the repository with the base and the different workflows and an example of its integration in a project.

Let us know what you think by joining the conversation on the 4D Forum!

Discuss

Tags CI/CD, Git, GitHub

Latest related posts

  • September 15, 2025

    Find the right spot in your 4D Write Pro document with AI

  • September 2, 2025

    Intelligent 4D Write Pro document analysis with AI

  • August 25, 2025

    ORDA – Constructor and touched event – Detailed behaviour through a network

Vanessa Talbot
Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • AI
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Formula Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy