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

Release docker image #36

Merged
merged 1 commit into from
Apr 8, 2020
Merged

Release docker image #36

merged 1 commit into from
Apr 8, 2020

Conversation

eddycharly
Copy link
Contributor

This is a try to configure goreleaser to publish docker images.

I don't know much about goreleaser so there are chances that it's not perfect.

Feel completely free to close the PR if it is not something you want to support, no worries.

@ccremer
Copy link
Contributor

ccremer commented Apr 7, 2020

Would also welcome this one, I actually just wanted to fork and contribute, then I saw this :) However, I would also create a GitHub actions pipeline for it. e.g.

.github/workflows/release.yaml

name: Release

on:
  push:
    tags:
    - "*"

jobs:
  goreleaser:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-go@v2-beta
      with:
        go-version: '^1.14.1'
    - uses: actions/cache@v1
      with:
        path: /home/runner/go/pkg/mod
        key: go-mod-release
    - name: Login to Docker hub
      run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
    - uses: goreleaser/goreleaser-action@v1
      with:
        args: release
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@norwoodj would then only need to setup the Docker Hub user credentials in the repo secrets by creating a Token on Docker Hub in the account profile, so that no personal password is required.

@norwoodj
Copy link
Owner

norwoodj commented Apr 8, 2020

@eddycharly thanks for the contribution! I'll merge and release this shortly. @ccremer I think this is a good idea, but I don't know anything about actions, so I'll probably leave that for a later issue. Please feel free to open an issue about adding an action like you've described.

@norwoodj norwoodj merged commit 0e6e33d into norwoodj:master Apr 8, 2020
@eddycharly
Copy link
Contributor Author

Thanks 👍

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.

3 participants