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

Run workflow button for workflow with workflow_dispatch

You can now create workflows that are manually triggered with the new workflow_dispatch event.
You will then see a ‘Run workflow’ button on the Actions tab, enabling you to easily trigger a run.
You can choose which branch the workflow is run on.
In addition, you can optionally specify inputs, which GitHub will present as form elements in the UI. Workflow dispatch inputs are specified with the same format as action inputs.

For example:

on: 
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log level'     
        required: true
        default: 'warning'
      tags:
        description: 'Test scenario tags'  

The triggered workflow receives the inputs in the github.event context.

For example:

jobs:
  printInputs:
    runs-on: ubuntu-latest
    steps:
    - run: |
        echo "Log level: ${{ github.event.inputs.logLevel }}"
        echo "Tags: ${{ github.event.inputs.tags }}" 

If you have any questions or thoughts about these changes, we recommend asking in our GitHub Community Forum’s Actions Board!

See more

You can now create workflow templates, making it easier to promote best practices and consistency across your organization.

  • Workflow templates are defined in a .github repository, enabling you to leverage all the power of GitHub’s collaborative capabilities and providing full auditability
  • You can optionally define rules for which repositories are a best fit for the templates

Learn more about workflow templates

For questions please visit the GitHub Actions community forum

See more

We’ve added some new workflow features to GitHub Actions based on your feedback.

Workflow and job level run defaults.

You can specify the shell and working-directory for the run action at either the job or workflow level, which makes using a shell different from the system’s default shell less verbose.
Learn more about run defaults

Job outputs

You can specify a set of outputs that you want to pass to subsequent jobs and then access those values from your needs context.
Learn more about job outputs

Matrix include lets you include new combinations

Previously the include in a matrix would only let you augment existing combinations. Now you can include completely new combinations and even specify all of your matrix legs with include.
Learn more about matrix include

Expressions in job.continue-on-error

You can now use expressions in the continue-on-error property for a job. This can be useful when you want to allow some jobs to fail based on runtime values such as a matrix.

jobs:
  build:
    strategy:
      matrix:
        os: ubuntu-latest, macos-latest, windows-latest
        node: [10, 12, 13]
      include:
        node: 13
        continue-on-error: true
    continue-on-error: ${{ matrix.continue-on-error }}

New fromJSON() method in expressions

The Actions expression language has a fromJSON(value) method that can take a stingified JSON object and bind it to a property.
Combining this with job.outputs you can build a workflow that has a fully dynamic matrix.

name: build
on: push
jobs:
  job1:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
    - id: set-matrix
      run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
  job2:
    needs: job1
    runs-on: ubuntu-latest
    strategy:
      matrix: ${{fromJson(needs.job1.outputs.matrix)}}
    steps:
    - run: build

Learn more about fromJson

New github context properties

The github context now has the repository_owner and job properties. The repository_owner is the account or organization that owns the repository. The job property contains the id of the job as specified in the workflow file.
Learn more about the github context

New steps context properties

The steps context now has properties for the outcome and conclusion. This allows you to conditionalize subsequent steps based on the the success or failure of a specific step.
Learn more about the steps context

See more

Self-Hosted Runners now fully support environments that use a proxy server to connect to GitHub. You can add your proxy server as a Runner setting and leverage common Unix-style proxy environment variables like no_proxy exclusion lists.

Additionally, Actions built using the toolkit will now follow your proxy settings. This includes the common Actions included at github.com/actions.

Learn more about using self-hosted runners behind a proxy here.

See more

We have changed the artifact download experience in GitHub Actions so it no longer adds an extra root directory to the downloaded archive.

Previously, if you uploaded the following files and folders as an artifact named `foo`, the downloaded archive would contain the following structure:

foo/
 |-- file1.txt
 |-- dir1/
 |    |-- dir1-file1.txt

Now, you will get an archive that only contains the files and folders you uploaded:

file1.txt
dir1/
|-- dir1-file1.txt
See more

We’ve fully deployed several updates to the macOS 10.15 virtual environment. You can see what changed in the diff here. Highlights include:

    • Xcode 11.2.1 is set by default
    • Added Xcode 11.3
    • Upgraded to Node.js 12.14.0 from 12.13.1
    • Upgraded to Yarn 1.21.1 from 1.19.2
    • Added CMake 3.16.2
    • Upgraded to Visual Studio for Mac 8.3.11.1 from 8.3.10.2
    • Upgraded to Android Emulator 29.3.2 from 29.2.11
See more

The GitHub Actions Runner is now open sourced. File issues and contribute to one of the most important components of GitHub Actions directly at:

https://github.com/actions/runner

The Runner is the application that runs a job from a GitHub Actions workflow. Jobs can be run in GitHub’s hosted virtual environments, or in your own self-hosted environment.  Learn more about using self-hosted runners with your workflows here.

See more

We’ve fully deployed several updates to the GitHub Actions virtual environments. Highlights include:

    • Upgraded to Visual Studio 16.4.0 (Windows Server 2019)
    • Upgraded to Firefox 71.0 (Ubuntu 18.04, Windows Server 2016, and Windows Server 2019)

You can find more information in the docs. Please note that we plan to pause updates until January 2020.

See more