DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. GitHub Actions Controlled with LaunchDarkly

GitHub Actions Controlled with LaunchDarkly

Check out the newest feature from GitHub, GitHub Actions, that makes it easier to develop quick and easy workflows for repositories.

John Kodumal user avatar by
John Kodumal
·
Oct. 29, 18 · Presentation
Like (3)
Save
Tweet
Share
2.63K Views

Join the DZone community and get the full member experience.

Join For Free

At GitHub Universe this week, GitHub announced a new, groundbreaking capability for repositories: GitHub Actions.

GitHub Actions allow you to implement custom logic without having to create an app to perform the task you need. You can combine GitHub Actions to create workflows using an action defined in your repository, a public repository on GitHub, or a published Docker container image.

With GitHub Actions, workflows are defined in your repository and triggered by events on GitHub.

For example, an action can publish npm modules, send SMS alerts when urgent issues are created, or deploy production-ready code.

In anticipation of the launch, GitHub asked us to use LaunchDarkly to showcase the power of GitHub Actions. We were excited to see how we could use GitHub Actions to automate workflows our customers use on a regular basis.

Simple Workflows

We set out to make it easier for developers to review Pull Requests for new features that are using feature flags. We started by creating a GitHub Action workflow on a repository. The simple case allowed us to trigger a deploy to a staging environment when a pull request (PR) was created. Though this is not anything new, it took practically no time to setup and was managed entirely through GitHub. No additional tools required.

Of course, the whole point of developing code with feature flags is to reduce the impact for folks that don't need to see the new features. In the case of a PR automating a deploy to staging, this likely means hiding this feature from everyone except the folks that need to review the PR. GitHub Actions allowed us to build a workflow to do just that.

We were easily able to create an Action that is triggered when a reviewer is added to a PR. The workflow will turn on the feature flag for every reviewer that is added to the PR, ensuring they will have access to the feature to conduct their review.

Adding Flags

Following through on the scenario above, we realized that there were times we wanted to have greater control over the GitHub Actions workflow. For example in the scenario given we realized that in some cases we might not want the deployment go to a staging environment, instead we might want to deploy to a QA environment first to allow for further testing and feedback.

We realized that we could use LaunchDarkly feature flags to control the behavior of the workflows in GitHub. We created a feature flag for the GitHub Action itself. When the workflow runs we can evaluate a feature flag in LaunchDarkly. When you want to change the deployment destination you can just update the flag, without having to change the workflow. And thanks to our the changes will be picked-up by GitHub in 200ms or less.

With GitHub Actions and LaunchDarkly, you get all the automation you want for your development workflows, with all the control you need through the use of feature flags.

One More Thing...

The more feature flags you create, they more they accumulate over time. It's a good idea to clean up flags that are no longer in use. However, often the challenge is remembering where a particular flag was used - and this can be particularly difficult for flags that are in multiple locations.

Teams that use LaunchDarkly for managing hundreds or even thousands of flags have asked for some way to keep track of all the flag locations. Thanks to GitHub Actions, we were able to build this highly requested feature. In our new Code tab, developers can now see everywhere a feature flag is used in their repositories.

What To Do Now?

If you'd like to give this a spin, sign-up for the GitHub Actions beta and let us know if you like to be added to the . We can't wait to see what you create.

GitHub workflow feature flag

Published at DZone with permission of John Kodumal, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Core Machine Learning Metrics
  • Promises, Thenables, and Lazy-Evaluation: What, Why, How
  • A Real-Time Supply Chain Control Tower Powered by Kafka
  • Using JSON Web Encryption (JWE)

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: