Apify Discord Mirror

Updated 5 months ago

Deployment metadata

At a glance

The community member is trying to understand how to programmatically bump the version of their Apify actors when deploying. They note that the actor version, build tag, and environment variables are only used when deploying via the Apify CLI, and not when deploying through other methods like GitHub integration. The community member also mentions that the Apify CLI is not recommended for deployment.

In the comments, another community member explains that actor version and build version are different concepts. They state that the build version can be customized when "forking" a build on the platform, but the patch version is automatically incremented. The community member suggests using the Apify API to create a new actor version and build it.

The original community member follows up, confirming that using the Apify API is the best way to achieve their goal, even though it seems convoluted. They thank the other community member for their support.

Useful resources
Hi, I'm trying to understand how to bump the version of my actors when deploying programatically.

On the one hand it's not possible using the API (https://docs.apify.com/platform/actors/development/actor-definition/actor-json#reference)
Actor name, version, buildTag, and environmentVariables are currently only used when you deploy your Actor using the Apify CLI and not when deployed, for example, via GitHub integration. There, it serves for informative purposes only.

On the other hand you recommend not using the CLI for deployment (https://docs.apify.com/academy/deploying-your-code/deploying#with-apify-cli)
The apify push command should only really be used for quickly pushing and testing Actors on the platform during development. If you are ready to make your Actor public, use a Git repository instead, as you will reap the benefits of using Git and others will be able to contribute to the project.

Creating a new build increments the PATCH version, but i also want to set the MAJOR and MINOR versions.
Is there a way I'm missing?
M
J
A
5 comments
Hello! Actor version and build version are two different things. See:
You can specify a custom major and minor build version when you "fork" your build on the platform, from the Source tab. Every build automatically increases the patch version: this behavior cannot be customized.
On the other hand, you are free to manage the actor version as you prefer.
Hey , thanks for your answer.

So it seems what i want is in API:
I guess there is no simpler way to bump the version and rebuild automatically, keeping the same env variables and so on? (this endpoint requires passing everything again in the payload
Yes, it seems to me like the best way to to do this through API.
ok it's convoluted but i've made it work, thanks for your support 🫑
just advanced to level 3! Thanks for your contributions! πŸŽ‰
Add a reply
Sign up and join the conversation on Discord