qcastel / github-actions-maven-release

Release your Java application and publish artifacts
129 stars 38 forks source link

release-branch-name is skipping #20

Closed mcahuet closed 3 years ago

mcahuet commented 3 years ago

I was trying to test this action with configurations :

- name: Maven release
        uses: qcastel/github-actions-maven-release@master
        with:
          access-token: ${{ secrets.GITHUB_TOKEN }}
          version-minor: true
          release-branch-name: "main"
          skip-perform: true

But when it runs I get:

Run Maven release [Docker publish/push] ☁ git clone 'https://github.com/qcastel/github-actions-maven-release' # ref=master [Docker publish/push] 🐳 docker build -t act-qcastel-github-actions-maven-release-master:latest [Docker publish/push] 🐳 docker run image=act-qcastel-github-actions-maven-release-master:latest entrypoint=[] cmd=["release-github-actions.sh"] | Last ${{ inputs.git-release-bot-name }} commit: | Current commit: | Current branch: main | Skipping for main branch Success - Maven release

It seems that the branch is skipped without taking into account the release-branch-name parameter.

In the pom.xml I put the following scm configuration :

    <scm>
        <connection>scm:git:ssh://git@github.com::<my_repo>.git</connection>
        <developerConnection>sscm:git:ssh://git@github.com:<my_repo>.git</developerConnection>
    </scm>
qcastel commented 3 years ago

Indeed seems you have setup the github actions correctly. I did had some debug logs and tried to reproduce it but couldn't.

I added this debug logs to try to help: https://github.com/qcastel/docker-maven-release/commit/ca2be35c249e58a2b66c51f033cb5317095a217b

Can you try again and share with me the logs you see?

mcahuet commented 3 years ago

Thanks, I add this log : | Current commit: | Current branch: main | Release branch name: ${{ inputs.release-branch-name }} | Skipping for main branch

qcastel commented 3 years ago

Thats weird man, that's not even an issue with this github action. Basically your github runner can't even interpret properly the action.yml Did you manage to get any github actions working currently? is it possible for you to reproduce it in a public repo? I can try to see what I can do although I doubt it's an issue on the github action itself. Are you using githubs enterprise or private github runners, something like that? wondering if the github actions engine that is a bit flaky

mcahuet commented 3 years ago

I use https://github.com/nektos/act with the runner nektos/act-environments-ubuntu:18.04 to test locally. Maybe it comes from this. I'll try on the githubs enterprise . Anyway thanks for your help.

qcastel commented 3 years ago

that make more sense. I would put my guilt on nektos at this point but we never know though, could be something else.

If you still struggle in the github enterprise, re-open this ticket and I will try to see what I can do to help