Blog posts (page 2)

  • GitHub Actions Day 26: Self-Hosted Runners
    This month I've talked a lot about the software installed on the runners that GitHub provides for running your workflows, and how to install new software. But what if you wanted to customize your own runner instead of using the ones that GitHub Actions provides? You can use the GitHub Actions self-hosted runner to run workflows on any infrastructure that you have, whether it's an on-premises machine or a runner that you configure in the cloud.
    Read more
  • GitHub Actions Day 25: Sparkle a Christmas Tree
    Today's Christmas, which means I'll spend it with my family. But I also thought it would be a good time to highlight a neat -- and holiday-themed -- use of GitHub Actions. My buddy Martin set up a workflow that will run whenever somebody stars his repository.
    Read more
  • GitHub Actions Day 24: Caching Dependencies
    Most software projects depend on a set of dependencies that need to be installed as part of the build and test workflows. If you're building a Node application, the first step is usually an npm install to download and install the dependencies. If you're building a .NET application, you'll install NuGet packages. And if you're building a Go application, you'll go get your dependencies. But this initial step of downloading dependencies is expensive. By caching them, we can reduce this time spent setting up our workflow.
    Read more
  • GitHub Actions Day 23: Upload Release Builds
    Here's another nice way that GitHub Actions has simplified the way that I manage my open source projects: when I create a new release, GitHub Actions will run a release build and add the final build archive directly to the release itself as an asset.
    Read more
  • GitHub Actions Day 22: Automerge Security Updates
    When GitHub started building GitHub Actions, it wasn't conceived of a just a CI/CD system -- it was meant to automate common tasks in your repository. Of course building and releasing are two of the most common tasks, but I love breaking out of the build and release pipeline and thinking about how GitHub Actions can help me manage other parts of my application. For example: security. When GitHub security updates opens a pull request to repair a security vulnerability in your repository, GitHub Actions will run your pull request validation tests. And if they pass? Why not have GitHub Actions just merge the update?
    Read more
  • GitHub Actions Day 21: GitHub Script
    So far this month, we've looked at a lot of different workflows. In some of them, we've manipulated some data that we got from GitHub. But they've all been read-only. What if we want to write data back to GitHub? You can use the github-script action to script your GitHub workflows directly.
    Read more
  • GitHub Actions Day 20: Container Services
    It's hard to underestimate the importance of containers in DevOps practices. Often, you'll deploy a container to production -- so it's natural to start using containers to do your local development. And to manage dependencies. We looked at how we could leverage this to do our builds inside containers. But we can also leverage running containers as part of our build and test workflow, using container services.
    Read more
  • GitHub Actions Day 19: Downloading Artifacts
    Yesterday we looked at how to upload artifacts as part of your workflow run, and then download them manually. This is incredibly useful for many scenarios, but I think that the more powerful part of using artifacts is to use them to transfer files between different steps.
    Read more
  • GitHub Actions Day 18: Artifacts
    When you build a workflow that performs pull request validation or continuous integration builds, you often want to take that build output and save it so that you can consume it later. Sometimes it makes sense to create a package and publish it up to a package registry like GitHub Packages. But sometimes you just want to store it as part of the build output that you can download later. GitHub Actions lets you upload artifacts as part of your workflow that you can download later.
    Read more
  • GitHub Actions Day 17: Dependent Jobs
    If you've set up a workflow with multiple jobs -- whether that's a matrix-based workflow or you've just defined the jobs individually -- the jobs run independently of each other, in parallel. Usually, that's ideal. Your jobs will run as soon as machines are available to execute them. But sometimes you want to be able to set up jobs that depend on other jobs. To specify dependencies between jobs, you can use the needs keyword to indicate what jobs rely on the completion of other jobs.
    Read more