actions

Subscribe to all “actions” posts via RSS or follow GitHub Changelog on Twitter to stay updated on everything we ship.

~ cd github-changelog
~/github-changelog|main git log main
showing all changes successfully

GitHub Actions now has an updated management experience for your self-hosted runners that makes it easier to manage runner groups and see the status of your runners. New Runners and Runner groups pages give you flexibility to get a summary view of your runners, or deep dive into a specific runner to edit it or see what job it may be currently running. You'll find both of these experiences in the Actions settings page of your repository or organization.

Runner List

Similarly, a new Runner groups page gives you a cleaner view of all the runner groups you've created, and how many runners are included in each one.

Runner Groups List

Learn more about self-hosting your runners for GitHub Actions.
Learn more about managing access to your runners with runner groups.

See more

You can now use setup-node action to cache dependencies for projects with monorepo and pnpm package manager. Use the optional cache-dependency-path field to specify the path to dependency file(s).

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
  with:
    node-version: 14
    cache: npm
    cache-dependency-path: 'sub-project/package-lock.json'

For questions, visit the setup-node repository and GitHub Actions community.

See more

Deployment review notifications for your GitHub Actions environments can now be tracked end-to-end using the GitHub app for Microsoft Teams or Slack. You will be notified when a review is pending on your environment, when an approval is completed and you can see the real time status of your deployment.

The following capabilities have been added to our Microsoft Teams and Slack applications:

  1. Deployment review pending notifications for your environments being deployed through GitHub Actions workflow.
  2. Deployment review completed notifications for your environments being deployed through GitHub Actions workflow.
  3. Deployment status notifications for your environments.

For more information visit the GitHub app guidance for Microsoft Teams or for Slack

See more

You can now run Java projects faster on GitHub Actions by enabling dependency caching on the setup-java action. setup-java supports caching for both Gradle and Maven projects.

The following example enables caching for a Java project with Gradle:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
  with:
    distribution: 'temurin'
    java-version: '11'
    cache: 'gradle'
- run: ./gradlew build

For additional examples, visit the setup-java repository.

See more

Previously, actions written in YAML could only use scripts. Now, they can also reference other actions. This makes it easy to reduce duplication in your workflows.

For example, the following action uses 3 actions to setup buildx, log in to Docker, and publish an image. By combining these into a single action it provides a larger unit of reuse that you can put into the job of any workflow.

name: "Publish to Docker"
description: "Pushes built artifacts to Docker"

inputs:
  registry_username:
    description: “Username for image registry”
    required: true
  registry_password:
    description: “Password for image registry”
    required: true

runs:
  using: "composite"
  steps:
      - uses: docker/setup-buildx-action@v1

      - uses: docker/login-action@v1
        with:
          username: ${{inputs.registry_username}}
          password: ${{inputs.registry_password}}

      - uses: docker/build-push-action@v2
        with:
          context: .
          push: true
          tags: user/app:latest

Developers can then reference this action in all of their repositories as a single action:

on: [push]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: my-org/publish-docker@v1
        with:
          registry_username: ${{secrets.REGISTRY_USERNAME}}
          registry_password: ${{secrets.REGISTRY_PASSWORD}}

Learn more about action composition.

For questions, visit the GitHub Actions community

See more

Windows Server 2022 with Visual Studio 2022 Preview is now available in beta on GitHub-hosted runners. Use it by putting runs-on: windows-2022 in your workflow file.

jobs:
  build:
    runs-on: windows-2022
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-dotnet@v1
      - name: Build
        run: dotnet build
      - name: Run tests
        run: dotnet test

The Windows Server 2022 runner image has different tools and tool versions than Windows Server 2019.

Read more on available runner images and beta images terms of use in docs.

See more

macOS 11 Big Sur is now generally available on GitHub-hosted runners. Use GitHub Actions to build and publish apps for the latest Apple ecosystem by updating your workflows to include runs-on: macos-11

jobs:
  build:
    runs-on: macos-11
    steps:
      - uses: actions/checkout@v2
      - name: Build
        run: swift build
      - name: Run tests
        run: swift test

The macOS 11 Big Sur runner image has different tools and tool versions than macOS 10.15 Catalina. See the full list of changed software.

If you spot any issues with your workflows when using Big Sur, please let us know by creating an issue in the virtual-environments repository.

See more

The Audit Log now includes events associated with GitHub Actions self-hosted runners. This data provides enterprise customers with an expanded data set for security and compliance audits.

New events will be incorporated into the audit log when:

  • A self-hosted runner application has started and can begin processing new jobs
  • A self-hosted runner application has stopped and will no longer process jobs

These new events are only available to customers on the Enterprise plan and can be viewed using the REST API.

Learn more about Audit Log events

For questions please visit the GitHub Actions community forum

See more

Maintainers now have additional control over when they must approve Actions runs for new contributors.

preview

In April, we shipped an update for GitHub Actions that required maintainers to approve Actions runs for first-time contributors in their repositories. Based on your feedback we have added additional settings to give you more control over this behavior.

Learn more about approving first time contributor pull requests

See more

Starting June 16 2021, GitHub-hosted Ubuntu runners will only contain the latest patch release for each supported version of the .NET SDK.

You will not be affected if you use setup-dotnet action. However, If you use a global.json file with a rollForward: disable property, your workflow will fail. To continue using .NET SDK, change your workflow to use setup-dotnet action or use some other value for rollForward property.

The setup-dotnet action is the recommended way of using .NET with GitHub Actions because it ensures consistent behavior for your workflow runs and allows you specify exactly which version your code needs. For more information please see the GitHub Actions documentation and subscribe to the announcement in the actions/virtual-environments repository.

See more