in Technology by
How to use events activity types in github Actions?

1 Answer

0 votes
by

Some events have activity types that give you more control over when your workflow should run. Use on.<event_name>.types to define the type of event activity that will trigger a workflow run.

For example, the issue_comment event has the creatededited, and deleted activity types. If your workflow triggers on the label event, it will run whenever a label is created, edited, or deleted. If you specify the created activity type for the label event, your workflow will run when a label is created but not when a label is edited or deleted.

on:
  label:
    types:
      - created

If you specify multiple activity types, only one of those event activity types needs to occur to trigger your workflow. If multiple triggering event activity types for your workflow occur at the same time, multiple workflow runs will be triggered. For example, the following workflow triggers when an issue is opened or labeled. If an issue with two labels is opened, three workflow runs will start: one for the issue opened event and two for the two issue labeled events.

on:
  issues:
    types:
      - opened
      - labeled

Related questions

0 votes
    How to use filters to target specific branches for pull request events in Github Actions?...
asked Jun 19, 2023 in Technology by JackTerrance
0 votes
    How to use filters to target specific branches or tags for push events in GitHub Actions?...
asked Jun 19, 2023 in Technology by JackTerrance
0 votes
    Which are the three types of actions in QTP?...
asked Oct 19, 2020 in Technology by JackTerrance
0 votes
    In , forecasts are made taking into account the estimates of current weather related events and ongoing ... proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    I am trying to use change tracking to copy data incrementally from a SQL Server to an Azure SQL Database. I ... change tracking table? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    Your online activity can still be tracked even if you use different Tor services, but not in much detail. 1) True 2) False...
asked Dec 30, 2020 in Technology by JackTerrance
0 votes
    How to use release management for your custom Github actions?...
asked Jun 17, 2023 in Technology by JackTerrance
0 votes
    Which activity can you use if you want to loop through a collection of items in uipath? Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    How to use activity types and filters with multiple events?...
asked Jun 19, 2023 in Technology by JackTerrance
0 votes
    What is the use of GitHub Actions?...
asked Apr 1, 2023 in Technology by JackTerrance
0 votes
    How will you differentiate between Git and GitHub?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    How do you push a file from your local system to the GitHub repository using Git?...
asked Oct 4, 2020 in Technology by Editorial Staff
...