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

Setup CI/CD workflows #365

Merged
merged 6 commits into from
Feb 13, 2022
Merged

Setup CI/CD workflows #365

merged 6 commits into from
Feb 13, 2022

Conversation

n8225
Copy link
Contributor

@n8225 n8225 commented Feb 12, 2022

Example results:
https://github.com/n8225/shiori/actions
https://github.com/n8225/shiori/releases/tag/v1.5.2
https://github.com/n8225/shiori/pkgs/container/shiori

  • Workflow
    • Pull request
      • golangci-lint (only tests code changed in pr)
      • unit tests
      • build
    • Push to master
      • golangci-lint (runs against entire repo)
      • unit tests
      • goreleaser (doesn't create a release unless HEAD is tagged, artifact available for download)
      • buildx (tagged dev and by git describe --tags unless HEAD is tagged)
    • Tag release
      • Manually ran workflow, requires input of version tag.
      • Executes git tag and pushes to master
      • goreleaser (creates release and publishes binaries)
      • buildx (tagged latest and version)
  • Tested(only tested sqlite)
    • Binaries
      • linux_x86_64
      • linux_aarch64
      • linux_armv7
      • windows_x86_64
    • Docker images
      • linux_x86_64
      • linux_aarch64
      • linux_armv7

Note: The buildx workflow does not use the Dockerfile in the repo. It creates a Dockerfile that reuses the binary created by goreleaser. The docker image created is also ran as a non-root user, so could be a breaking change(I beleive you can just fun it with -u root to continue running as root).

Invalidates #278
Related Issues: #263 #260

Closes #254 #267 #238 #273 #278

@fmartingr
Copy link
Member

Holy molly @n8225 this sounds awesome! I can't thank you enough for all the work you've done, it's very well put and easy to use for us maintaners. Amazing.

It seems that the linter is giving quite a few errors already in your examples (in master), I will fix those after this is merged so we can have green PRs for any old/new contribution.

Again, thanks a lot.

@fmartingr fmartingr self-requested a review February 12, 2022 20:16
@n8225 n8225 marked this pull request as ready for review February 12, 2022 21:38
@n8225
Copy link
Contributor Author

n8225 commented Feb 12, 2022

I still need to implement deleting old docker images, but other than that this PR is ready to go.
FYSA with 5 docker versions(3 architectures) I'm using .1524gb of shared storage.

@fmartingr
Copy link
Member

Thanks a lot for your contribution @n8225, this will save a lot of time in reviews and releases. The cleanup can be done in a later step as well since .5GB of space can hold a few releases.

@fmartingr fmartingr mentioned this pull request Feb 13, 2022
@fmartingr
Copy link
Member

Awesome work @n8225!

I'm going to merge it and I will try the workflows once I merge some bugfixes.

Thanks!

@fmartingr fmartingr merged commit d05d1ad into go-shiori:master Feb 13, 2022
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.

Panic while trying to run cross compiled binary on Raspberry PI
2 participants