github / vscode-github-actions

GitHub Actions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions
MIT License
492 stars 92 forks source link

Doesn't sync with the new action #209

Open mr250792 opened 1 year ago

mr250792 commented 1 year ago

Describe the bug Creating new action file in the new branch doesn't shows up the actions in the workflows section.

I have created a new branch from the main branch and added a new workflow file test.yml and tried two scenario to run the action in VSCode

  1. I have committed and pushed the file but it doesn't shows the list action in the workflow action
  2. I have merged that in the main branch and after that while clicking on refresh it showing the list

To Reproduce Steps to reproduce the behavior:

  1. create a new branch
  2. add new workflow test.yml
  3. add, commit and push the code
  4. and check the Workflow section, newly added workflow is not listed

Expected behavior It can show the list of newly created workflow action

Screenshots If applicable, add screenshots to help explain your problem.

Extension Version v0.25.7

Additional context I am running in the Mac

elbrenn commented 1 year ago

The extension uses the actions workflows API to populate the list of workflows in the sidebar. It is therefor limited by/ consistent with workflow creation in all of Github Actions. It mirrors the behavior of GitHub web UI.

For a workflow to be created (and show up in the sidebar) it needs to either: a) be checked into the default branch or b) have a run associated with it. If your workflow has a workflow dispatch trigger, a workaround would be to introduce another trigger like push to trigger one run.