Skip to content

jobs.<job_name>.snapshot allows github context but it is not listed in 'Available context' document #41255

@rhysd

Description

@rhysd

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflows-and-actions/contexts

What part(s) of the article would you like to see updated?

The custom images document says that the following workflow is valid. Notice that jobs.<job_name>.snapshot.if accesses github context.

jobs: 
  build:
    runs-on: my-image-generation-runner
    snapshot: 
        if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
        image-name: my-custom-image
        version: 2.*
    steps:

However the context availability table does not list the snapshot (or snapshot.if) key. Not listed in the table means no context is available. So I believe the key is missing in the table and we need an update.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    InactiveWill be closed automatically by a stall check if no activity is detected.contentThis issue or pull request belongs to the Docs Content teamgithub_actionsPull requests that update GitHub Actions code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions