@edricchan03, could you query your artifacts with the download-artifact action to determine the commit sha they were last built with?
For example, if an artifact included the short hash of a commit in its name, like “my-artifact-03fh5v” and if the current commit hash is 03fh5v then don’t rebuild.
Similarly, if you don’t want to put the commit hash as part of the name, perhaps you could publish as an artifact a text file that contains the commit it was built with. Your build job would query that file and compare the commit hashes. If the same, don’t do anything.
Originally I was going to suggest using @actions/cache but then read one of the limitations is that the cache is only available for
pull_request events, not scheduled.