wirthual / deutschland-generator-action

Github action for the generation process of generating docs and code for the deutschland package
Apache License 2.0
0 stars 2 forks source link

run upload only on main branch #6

Closed wirthual closed 1 year ago

wirthual commented 1 year ago

@t-huyeng This should check if the action runs on the main branch, and only trigger the upload step then.

What do you think?

t-huyeng commented 1 year ago

LGTM! I think a generation based on a tag would be even better, but maybe that can be the next step.

This PR is already included in the latest tag of this action, to have only merged changes in the latest tag see (#7). (see https://github.com/bundesAPI/nina-api/actions/runs/4342333108/jobs/7583021239 which already runs with the changes proposed here)

wirthual commented 1 year ago

Thanks for the MR.

Also I see this output in the logs:

 WARNING  Skipping de_nina-1.1.0-py3-none-any.whl because it appears to already  
         exist                                                                  
WARNING  Skipping de_nina-1.1.0.tar.gz because it appears to already exist  

Shouldnt this output be avoided due to the new changes?

I looked into the version extraction, we could use this: https://github.com/marketplace/actions/extract-version-from-tag

And then use yq to write the extracted tag into the detector_config.yaml with https://github.com/marketplace/actions/yq-portable-yaml-processor

wirthual commented 1 year ago

Oh, nvm I see it was run on master. Lets merge this and I will tackle the version tag extraction in a different branch.

t-huyeng commented 1 year ago

The output is what I expected. The commit that triggered the action (bundesAPI/nina-api@7a7444a) did not update the package version, but was still a direct change to the main branch.

So in the current state, without using tags and automatically changing the package-version for each tag, the deutschland-workflow is triggered.