Skip to content

Using github.event.repository.is_template in the condition #5

@DavidVanKampen-eaton

Description

@DavidVanKampen-eaton

Following examples from github skills, if the if condition in the setup.yml workflow is changed from looking at repository name to looking if the repository is a template repository, then this approach will be a bit more portable for others who may want to re-use it.

That is - this line:

if: ${{ github.repository != 'simonw/python-lib-template-repository' }}

could be updated to

if:  ${{ !github.event.repository.is_template }}

thus removing the hard-coded owner name and repository name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions