Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of master branch image name #89

Closed
wants to merge 1 commit into from
Closed

Allow customization of master branch image name #89

wants to merge 1 commit into from

Conversation

denisgranha
Copy link

For some projects it might be confusing to have latest being master branch instead of the latest tagged docker image.

In the case of https://github.com/openethereum/openethereum for example, we want to tag master as "nightly"

@elgohr
Copy link
Owner

elgohr commented May 26, 2020

Thank you for the PR at first.
It would have been great, if you would have discussed this in the issues first.
There's already a way to set custom tags for individual branches (https://github.com/elgohr/Publish-Docker-Github-Action/blob/master/README.md#tags-1).
In this way I don't see a need for this

@denisgranha
Copy link
Author

hi @elgohr thanks for you fast reply!
But that’s not the same right? It will push also “latest” for master and we want to avoid that

@denisgranha
Copy link
Author

ah, but this is actually missing something. I forgot to add the var to this line https://github.com/denisgranha/Publish-Docker-Github-Action/blob/master/entrypoint.sh#L96

@denisgranha
Copy link
Author

but you say that by using custom tags, that has priority. Ok I can see in https://github.com/denisgranha/Publish-Docker-Github-Action/blob/master/entrypoint.sh#L92

will try then, thx

@elgohr
Copy link
Owner

elgohr commented May 26, 2020

name: Publish to Nightly
on:    
  push:
    branches:
      - master
jobs:
  update:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Publish to Registry
      uses: elgohr/Publish-Docker-Github-Action@master
      with:
        name: myDocker/repository
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        tags: "nightly"

will push master to nightly.
See https://github.com/elgohr/Publish-Docker-Github-Action/blob/master/test.bats#L540

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants