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

ci: unify local and ci docker workflows #907

Merged
merged 17 commits into from
May 14, 2024
Merged

ci: unify local and ci docker workflows #907

merged 17 commits into from
May 14, 2024

Conversation

fmartingr
Copy link
Member

@fmartingr fmartingr commented May 12, 2024

This pull request simplifies the CI and container files around to use the same logic locally and in the release process.

  • Removed all docker context from the CI, now using the main Dockerfile in the root of the repository
  • Refactored the dockerfile to streamline the build process: file is copied and some basics installed to a scratch image
  • Removed OpenBSD arm64 test step

Fixes #546
Closes #905

@fmartingr fmartingr self-assigned this May 12, 2024
@fmartingr fmartingr added this to the 1.7.0 milestone May 12, 2024
@fmartingr fmartingr requested a review from Monirzadeh May 12, 2024 18:53
Copy link
Collaborator

@Monirzadeh Monirzadeh left a comment

Choose a reason for hiding this comment

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

i don't use docker(i don't want give root access to that) and try to use make buildx with podman instead but shell script not accept alias so i can test that locally.
somehow it is problem in my side but it can be good if script can work with podman too(for local use).
i don't see any problem in code, (but i can't test that because of that problem)

@fmartingr
Copy link
Member Author

i don't use docker(i don't want give root access to that) and try to use make buildx with podman instead but shell script not accept alias so i can test that locally.

somehow it is problem in my side but it can be good if script can work with podman too(for local use).

i don't see any problem in code, (but i can't test that because of that problem)

Does podman support buildx? I can bundle something in the script.

@Monirzadeh
Copy link
Collaborator

Monirzadeh commented May 12, 2024

based on podman documentation here

podman buildx build command is an alias of podman build. Not all buildx build features are available in Podman.

but i am not sure if we use any of those specific feature they mention or not, so we can try.

@fmartingr
Copy link
Member Author

based on podman documentation here

podman buildx build command is an alias of podman build. Not all buildx build features are available in Podman.

but i am not sure if we use any of those specific feature they mention or not, so we can try.

You can try it locally running:

make buildx-local CONTAINER_RUNTIME=podman

I prepared it for other container runtimes but didn't test it. This command worked on my linux machine.

Copy link
Collaborator

@Monirzadeh Monirzadeh left a comment

Choose a reason for hiding this comment

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

Hi i test that and work fine :+1
just one things :
when it create image left type=docker directory in root of project
if it possible (not needed that anymore) automatic remove them or move that to tmp directory.
if you want to keep that not bad if move that to dev-data and add to git ignore too.

@fmartingr
Copy link
Member Author

Hi i test that and work fine :+1 just one things : when it create image left type=docker directory in root of project if it possible (not needed that anymore) automatic remove them or move that to tmp directory. if you want to keep that not bad if move that to dev-data and add to git ignore too.

Ummm, the container options specify -t shiori:localdev --output type=docker. Are you saying that this creates a folder in the root path for podman? With docker what this does is create the image directly into the docker daemon. Let me test that on my laptop.

@Monirzadeh
Copy link
Collaborator

Monirzadeh commented May 13, 2024

yes in root of project i have type=docker that contain files and folders that use for creating images

ls ./type=docker 
etc  shiori  usr

@fmartingr
Copy link
Member Author

yes in root of project i have type=docker that contain files and folders that use for creating images

ls ./type=docker 
etc  shiori  usr

Yeah just checked, it seems that podman does not support storing it directly as an image, so you would need to customize the CONTAINER_BUILDX_OPTIONS to your needs too.

I'd say that's out of scope for this PR, but if you find a way of doing so feel free to send a PR with customizations for podman as well.

Copy link
Collaborator

@Monirzadeh Monirzadeh left a comment

Choose a reason for hiding this comment

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

so temporary we can add that directory to gitignore to find a solution for that later

# Exclude podman file
/type=docker*

@fmartingr fmartingr merged commit 647945c into master May 14, 2024
12 checks passed
@fmartingr fmartingr deleted the issue-546 branch May 14, 2024 06:01
truecharts-admin referenced this pull request in truecharts/public Jun 8, 2024
…0@85a47b2 by renovate (#23111)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/go-shiori/shiori](https://togithub.com/go-shiori/shiori) |
minor | `v1.6.3` -> `v1.7.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>go-shiori/shiori (ghcr.io/go-shiori/shiori)</summary>

###
[`v1.7.0`](https://togithub.com/go-shiori/shiori/releases/tag/v1.7.0)

[Compare
Source](https://togithub.com/go-shiori/shiori/compare/v1.6.3...v1.7.0)

**Always remember to backup your data before updating.**

#### Notable changes

##### System Theme
([@&#8203;Monirzadeh](https://togithub.com/Monirzadeh))
[#&#8203;924](https://togithub.com/go-shiori/shiori/issues/924)

Shiori now allows you to change the theme to light/dark or follow the
system configuration.

![Screenshot 2024-06-03 at 13 19
39](https://togithub.com/go-shiori/shiori/assets/812088/76e3e062-e36c-4118-84d5-563ad48334cb)

##### New migrations backend
([@&#8203;fmartingr](https://togithub.com/fmartingr))
[#&#8203;876](https://togithub.com/go-shiori/shiori/issues/876)

The underlying migrations system has been rewritten to custom code
removing the [go-migrate
dependency](https://togithub.com/golang-migrate/migrate).

This not only removes one more dependency but also allows for more
control over the migrations process by letting us add run code in a
migration, for example, to update the database schema.

This should be transparent for all users but if you find any problems
please [report
it](https://togithub.com/go-shiori/shiori/issues/new/choose)

##### OpenBSD support
([@&#8203;pacoesteban](https://togithub.com/pacoesteban))
[#&#8203;780](https://togithub.com/go-shiori/shiori/issues/780)

This has been in the works for several months since we broke it around
1.5 but thanks to the above migration changes and some custom database
engine backend for OpenBSD, we are now able to support OpenBSD again. We
added a CI step to get early warnings if we introduce something that
breaks support.

#### What's Changed

- feat: new migration system by
[@&#8203;fmartingr](https://togithub.com/fmartingr) in
[https://github.com/go-shiori/shiori/pull/876](https://togithub.com/go-shiori/shiori/pull/876)
- chore(deps): bump the all group across 1 directory with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-shiori/shiori/pull/895](https://togithub.com/go-shiori/shiori/pull/895)
- refactor: allow specific sqlite engine for OpenBSD by
[@&#8203;pacoesteban](https://togithub.com/pacoesteban) in
[https://github.com/go-shiori/shiori/pull/780](https://togithub.com/go-shiori/shiori/pull/780)
- chore(deps): bump the all group across 1 directory with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-shiori/shiori/pull/900](https://togithub.com/go-shiori/shiori/pull/900)
- chore(deps): bump the all group with 4 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-shiori/shiori/pull/902](https://togithub.com/go-shiori/shiori/pull/902)
- fix: not checking for nil-pointer errors on migrations by
[@&#8203;fmartingr](https://togithub.com/fmartingr) in
[https://github.com/go-shiori/shiori/pull/906](https://togithub.com/go-shiori/shiori/pull/906)
- ci: unify local and ci docker workflows by
[@&#8203;fmartingr](https://togithub.com/fmartingr) in
[https://github.com/go-shiori/shiori/pull/907](https://togithub.com/go-shiori/shiori/pull/907)
- fix: ensure tmp folder is present on docker container by
[@&#8203;fmartingr](https://togithub.com/fmartingr) in
[https://github.com/go-shiori/shiori/pull/910](https://togithub.com/go-shiori/shiori/pull/910)
- deps: update golang dependencies by
[@&#8203;fmartingr](https://togithub.com/fmartingr) in
[https://github.com/go-shiori/shiori/pull/915](https://togithub.com/go-shiori/shiori/pull/915)
- chore(deps): bump the all group with 3 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-shiori/shiori/pull/908](https://togithub.com/go-shiori/shiori/pull/908)
- chore(deps): bump the all group with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-shiori/shiori/pull/917](https://togithub.com/go-shiori/shiori/pull/917)
- feat: Home button clear search query by
[@&#8203;Monirzadeh](https://togithub.com/Monirzadeh) in
[https://github.com/go-shiori/shiori/pull/916](https://togithub.com/go-shiori/shiori/pull/916)
- chore(deps): bump codecov/codecov-action from 4.4.0 to 4.4.1 in the
all group by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-shiori/shiori/pull/922](https://togithub.com/go-shiori/shiori/pull/922)
- chore: check for avx2 processor feature when trying to run bun by
[@&#8203;Monirzadeh](https://togithub.com/Monirzadeh) in
[https://github.com/go-shiori/shiori/pull/920](https://togithub.com/go-shiori/shiori/pull/920)
- ci: fix codecov action by
[@&#8203;fmartingr](https://togithub.com/fmartingr) in
[https://github.com/go-shiori/shiori/pull/928](https://togithub.com/go-shiori/shiori/pull/928)
- fix: incorrect original link in archive page by
[@&#8203;fmartingr](https://togithub.com/fmartingr) in
[https://github.com/go-shiori/shiori/pull/931](https://togithub.com/go-shiori/shiori/pull/931)
- fix : wrong response type for readable endpoint documentation by
[@&#8203;Monirzadeh](https://togithub.com/Monirzadeh) in
[https://github.com/go-shiori/shiori/pull/932](https://togithub.com/go-shiori/shiori/pull/932)
- feat: allow selecting light/dark/follow themes in the webui by
[@&#8203;Monirzadeh](https://togithub.com/Monirzadeh) in
[https://github.com/go-shiori/shiori/pull/924](https://togithub.com/go-shiori/shiori/pull/924)
- fix: add version to goreleaser archive filename by
[@&#8203;fmartingr](https://togithub.com/fmartingr) in
[https://github.com/go-shiori/shiori/pull/934](https://togithub.com/go-shiori/shiori/pull/934)

#### New Contributors

- [@&#8203;pacoesteban](https://togithub.com/pacoesteban) made their
first contribution in
[https://github.com/go-shiori/shiori/pull/780](https://togithub.com/go-shiori/shiori/pull/780)

**Full Changelog**:
go-shiori/shiori@v1.6.3...v1.7.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTkuMyIsInVwZGF0ZWRJblZlciI6IjM3LjM5OS4zIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImF1dG9tZXJnZSIsInVwZGF0ZS9kb2NrZXIvZ2VuZXJhbC9ub24tbWFqb3IiXX0=-->
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.

Docker image cannot be used with SQLite in a mounted volume
2 participants