Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: enable partially execution of the action #478

Closed
1 task done
AndreasAugustin opened this issue Mar 2, 2024 · 2 comments · Fixed by #516
Closed
1 task done

[Feat]: enable partially execution of the action #478

AndreasAugustin opened this issue Mar 2, 2024 · 2 comments · Fixed by #516
Assignees
Labels
enhancement New feature or request

Comments

@AndreasAugustin
Copy link
Owner

Describe the feature

Would be nice to have the possibility to only execute some partial steps within the action.

e.g.

 - name: Test action step
        uses: AndreasAugustin/actions-template-sync@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          source_repo_path: AndreasAugustin/template.git
          steps: pull,commit  # define the steps to execute

With this people are able to use different actions with the current workflow steps

Use Case

Sometimes people want to be able to have some actions, commands executed in between the step (e.g. discussion #467, or https://github.com/cookiecutter/cookiecutter).
With the possibility of the split something like

- name: Test action step
      uses: AndreasAugustin/actions-template-sync@v1
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        source_repo_path: AndreasAugustin/template.git
        steps: pull  # define the steps to execute
- name: step in between
  run: sed -i "s/foo/\/bar/g" "*.md" \;
- name: Test action step
    uses: AndreasAugustin/actions-template-sync@v1
    with:
      github_token: ${{ secrets.GITHUB_TOKEN }}
      source_repo_path: AndreasAugustin/template.git
      steps: commit,push,pr  # define the steps to execute

would be possible.

The difference to the hooks would be that the people would also be able to use other github actions in between.
(currently possible with hooks e.g. use exit 0 in hook, but not super convenient. 🥷 )

Proposed Solution

No response

Acknowledgements

  • I may be able to implement this feature request
@kdeldycke
Copy link
Contributor

Oh. Now I get what you meant in #467. That would be indeed a super-powerful feature. I'm ready to test it as an alternative to hooks if you have a prototype.

@AndreasAugustin
Copy link
Owner Author

AndreasAugustin commented Mar 11, 2024

Remark:
Some preparations are also done within #498 because we need to have proper permissions on the runner after using the action (e.g. #484 ) or else the feature is kinda useless

Update
prerequisites should be done with #498 and the refactoring part.

@AndreasAugustin AndreasAugustin self-assigned this Mar 13, 2024
@AndreasAugustin AndreasAugustin modified the milestone: v1.0.0 Mar 13, 2024
AndreasAugustin added a commit that referenced this issue Apr 14, 2024
Signed-off-by: Andy Augustin <dev@andreas-augustin.org>
AndreasAugustin added a commit that referenced this issue Apr 14, 2024
Signed-off-by: Andy Augustin <dev@andreas-augustin.org>
AndreasAugustin added a commit that referenced this issue Apr 14, 2024
Signed-off-by: Andy Augustin <dev@andreas-augustin.org>
AndreasAugustin added a commit that referenced this issue Apr 23, 2024
* feat(#478): ✨ add option to split action

---------

Signed-off-by: Andy Augustin <dev@andreas-augustin.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

2 participants