Is it possible to test a Github action without publishing it on marketplace?

My current develop-test iterations while creating a Github action is as follows:

  1. Develop the github action, create a release and publish it on marketplace, as v0.1.0 for instance.
  2. Have the sample test repository to use this action’s v0.1.0 and test the workflow
  3. If the action doesn’t behave as desired, push new updates on its repository, create another release and publish another version on marketplace as v0.1.1 for instance.
  4. Update the test repo’s workflow file to use v0.1.1 and test the workflow again
  5. Repeat and complain about how ineffective this is :slight_smile:

As you can imagine, step #3 happens a lot because this is a development cycle and you may not know how to do some operations, how to pass variables, how to run steps/jobs, etc… all in advance. So you iterate tons of times when you’re creating a Github action.

Is there a way to shorten this lifecycle? Can we somehow test the actions we create, before publishing them on the marketplace and having to create version after version? This would immensely reduce the development time for your action creators.

Thank you in advance!

Hi @aslisabanci,

Based on the doc of publishing marketplace, your action repository should be public.

Github actions supports git ref/sha/tag version for the usage: {owner}/{repo}@{ref}(doc here). Hence, before you publich the action to marketplace, you can use {owner}/{repo}@sha to have a test. Publish it untill it works as expected.

Thanks

Thanks for the answer @weide-zhou!

Yes my action repository is public, because I cannot otherwise publish it on the marketplace as you said. I didn’t know that {owner}/{repo}@{ref} usage works before/without publishing the action on the marketplace though. If this is made clear on the “Creating Actions” section of the documentation, I’m sure it would help many others suffering from the same thing as me.

Thanks for your quick reply @aslisabanci!

According to the policy, it’s recommended to raise a feedback ticket in below link where github product manager will take a review, it will promote the improvement of the doc.

https://support.github.com/contact/feedback?contact[category]=actions

You can also mark the answer then it could help other guys who have same query. :grinning:

1 Like

Private actions are on the roadmap for Q1 2021:

1 Like