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

Automate release with Github actions #302

Merged
merged 1 commit into from
Aug 31, 2021
Merged

Conversation

miry
Copy link
Contributor

@miry miry commented Aug 27, 2021

Use Github Container registry instead of DockerHub.

@miry miry force-pushed the github-actions-dockr-push branch from 2bac280 to 19b6b6e Compare August 27, 2021 09:28
@miry miry added the wip label Aug 27, 2021
@miry miry force-pushed the github-actions-dockr-push branch from 19b6b6e to 68cdc7b Compare August 27, 2021 12:42
@miry miry self-assigned this Aug 28, 2021
Copy link
Contributor

@thepwagner thepwagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a nit that's safe to ignore.

release:
runs-on: ubuntu-latest
permissions:
contents: write
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice - I like how this drops privileges 😍.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It requires for release to Github.

steps:
-
name: Checkout
uses: actions/checkout@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea: did you consider using the commit/digest, instead of tracking a mutable tag?

Maybe just for goreleaser/goreleaser-action? The first party actions/* actions are less important, but pinning third party actions is a best practice.

I'm a fan of pinning to immutable digests, then using Dependabot to follow v2.3.3 -> v2.3.4, instead of following the mutable v2 tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Thank you for the full clarification.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to keep the official actions like actions/checkout@v2 and actions/setup-go@v2, because there are no maintainers to merge Dependbot's PRs and it was suggested by Github.

@miry miry removed the wip label Aug 31, 2021
@miry miry changed the title Setup Docker publish workflow Automate release with Github actions Aug 31, 2021
The current process according the README is manual.
It requires to have access users to DockerHub.

After small investigation, found that DockerHub is not actively
internaly used and decided to switch container registry to Github.

The relase part was done with [goreleaser](https://github.com/goreleaser/goreleaser).
It can create Release in Github, Container registries and Homebrew.

Update documentation to use Github container registry for new versions.
@miry miry force-pushed the github-actions-dockr-push branch from d173bec to e5daf06 Compare August 31, 2021 10:07
@miry miry merged commit 653f495 into master Aug 31, 2021
@miry miry deleted the github-actions-dockr-push branch August 31, 2021 10:28
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