Georg Lauterbach
f8e1bb0f42
ci: improve GitHub Action CI with re-usable workflows ( #2753 )
...
Mew re-usable workflows are introduced to handle building, testing and publishing the container
image in a uniform and easy way. Now, the `scheduled_builds`, `default_on_push`
and a part of the `test_merge_requests` workflow can use the same code
for building, testing and publishing the container images. This is DRY.
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2022-09-09 11:12:17 +02:00
Brennan Kinney
21fbbfabe1
ci: Better build caching for CI ( #2742 )
...
* ci: Cache builds by splitting into two jobs
For the cache to work properly, we need to derive a cache key from the build context (files that affect the Dockerfile build) instead of the cache key changing by commit SHA.
We also need to avoid a test suite failure from preventing the caching of a build, thus splitting into separate jobs.
This first attempt used `upload-artifact` and `download-artifact` to transfer the built image, but it has quite a bit of overhead and prevented multi-platform build (without complicating the workflow further).
* ci: Transfer to dependent job via cache only
While `download-artifact` + `docker load` is a little faster than rebuilding the image from cached layers, `upload-artifact` takes about 2 minutes to upload the AMD64 (330MB) tar image export (likely due to compression during upload?).
The `actions/cache` approach however does not incur that hit and is very quick (<10 secs) to complete it's post upload work. The dependent job still gets a cache-hit, and the build job is able to properly support multi-platform builds.
Added additional notes about timing and size of including ARM builds.
* ci: Move Dockerfile ARG to end of build
When the ARG changes due to commit SHA, it invalidates all cache due to the LABEL layers at the start. Then any RUN layers implicitly invalidate, even when the ARG is not used.
Introduced basic multi-stage build, and relocated the container config / metadata to the end of the build. This avoids invalidating expensive caching layers (size and build time) needlessly.
2022-08-28 11:42:42 +12:00
dependabot[bot]
2d0f5a0791
chore(deps): Bump docker/build-push-action from 3.1.0 to 3.1.1 ( #2714 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-08 16:37:07 +02:00
dependabot[bot]
73ef30e14c
chore(deps): Bump docker/build-push-action from 3.0.0 to 3.1.0 ( #2694 )
2022-07-25 18:18:37 +02:00
Naveen
13a194466b
chore: Set permissions for GitHub actions ( #2555 )
...
* chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ )
Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
* Update docs-production-deploy.yml
* added `packages: write` permissions
this is apparently needed by GH so this repository can push new images.
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Casper <casperklein@users.noreply.github.com>
2022-05-11 09:51:15 +02:00
dependabot[bot]
28dfb1bd00
chore(deps): Bump docker/setup-qemu-action from 1.2.0 to 2.0.0 ( #2580 )
...
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action ) from 1.2.0 to 2.0.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases )
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1.2.0...v2.0.0 )
---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2022-05-10 18:07:49 +02:00
dependabot[bot]
18f697970f
chore(deps): Bump docker/build-push-action from 2.10.0 to 3.0.0 ( #2582 )
...
Bumps [docker/build-push-action](https://github.com/docker/build-push-action ) from 2.10.0 to 3.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases )
- [Commits](https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0 )
---
updated-dependencies:
- dependency-name: docker/build-push-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2022-05-10 08:43:00 +02:00
dependabot[bot]
a7c02365ce
chore(deps): Bump docker/setup-buildx-action from 1.7.0 to 2.0.0 ( #2583 )
...
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action ) from 1.7.0 to 2.0.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases )
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.7.0...v2.0.0 )
---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-10 08:32:18 +02:00
dependabot[bot]
94fff05424
chore(deps): Bump docker/setup-buildx-action from 1.6.0 to 1.7.0 ( #2574 )
...
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action ) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases )
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.6.0...v1.7.0 )
---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2022-05-02 15:52:19 +02:00
dependabot[bot]
00dffb21f0
chore(deps): Bump actions/cache from 2.1.7 to 3 ( #2502 )
2022-03-21 18:43:58 +01:00
dependabot[bot]
0dc80e6d13
chore(deps): Bump docker/build-push-action from 2.9.0 to 2.10.0 ( #2501 )
2022-03-21 15:03:38 +01:00
dependabot[bot]
bf7fba68bd
chore(deps): bump actions/checkout from 2 to 3 ( #2470 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
2022-03-09 11:57:01 +13:00
dependabot[bot]
7b21db77cc
chore(deps): bump docker/build-push-action from 2.8.0 to 2.9.0 ( #2399 )
...
Bumps [docker/build-push-action](https://github.com/docker/build-push-action ) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/docker/build-push-action/releases )
- [Commits](https://github.com/docker/build-push-action/compare/v2.8.0...v2.9.0 )
---
updated-dependencies:
- dependency-name: docker/build-push-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-07 16:57:22 +01:00
dependabot[bot]
b2b701a478
chore(deps): bump docker/build-push-action from 2.7.0 to 2.8.0 ( #2376 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 20:28:14 +01:00
dependabot[bot]
7bf1b7eea4
chore(deps): bump actions/cache from 2.1.6 to 2.1.7 ( #2309 )
...
Bumps [actions/cache](https://github.com/actions/cache ) from 2.1.6 to 2.1.7.
- [Release notes](https://github.com/actions/cache/releases )
- [Commits](https://github.com/actions/cache/compare/v2.1.6...v2.1.7 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-29 13:16:43 +01:00
Casper
f2c4712c4f
Streamline workflow step seperation ( #2222 )
...
* streamline workflow step separation
* doh!
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2021-09-28 12:37:54 +02:00
Nathan Pierce
0da66ccb34
setup.sh: docker_container first, then fall back to docker_image ( #2134 )
...
* docker_container first, then fall back to docker_image
+ test changes to support
+ test change to wait for smtp port to fix flakey tests since https://github.com/docker-mailserver/docker-mailserver/pull/2104
* quick fix
* Update setup.sh
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Casper <casperklein@users.noreply.github.com>
2021-09-06 10:13:12 +00:00
dependabot[bot]
5697a5e5ce
chore(deps): bump docker/setup-buildx-action from 1.5.1 to 1.6.0 ( #2168 )
...
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action ) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases )
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.5.1...v1.6.0 )
---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-05 11:22:02 +02:00
dependabot[bot]
9dc3810b45
chore(deps): bump docker/build-push-action from 2.6.1 to 2.7.0 ( #2146 )
2021-08-23 16:02:55 +02:00
dependabot[bot]
adf4784237
chore(deps): bump docker/setup-buildx-action from 1.5.0 to 1.5.1 ( #2083 )
...
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action ) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases )
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.5.0...v1.5.1 )
---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-12 14:12:21 +02:00
dependabot[bot]
9f47d04dde
chore(deps): bump docker/setup-buildx-action from 1.3.0 to 1.5.0 ( #2067 )
...
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action ) from 1.3.0 to 1.5.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases )
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.3.0...v1.5.0 )
---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
2021-07-05 10:16:03 +00:00
dependabot[bot]
f2a3df5991
chore(deps): bump docker/build-push-action from 2.5.0 to 2.6.1 ( #2068 )
...
Bumps [docker/build-push-action](https://github.com/docker/build-push-action ) from 2.5.0 to 2.6.1.
- [Release notes](https://github.com/docker/build-push-action/releases )
- [Commits](https://github.com/docker/build-push-action/compare/v2.5.0...v2.6.1 )
---
updated-dependencies:
- dependency-name: docker/build-push-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-05 12:15:10 +02:00
dependabot[bot]
20fae41541
chore(deps): bump docker/build-push-action from 2.4.0 to 2.5.0 ( #2018 )
...
Bumps [docker/build-push-action](https://github.com/docker/build-push-action ) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/docker/build-push-action/releases )
- [Commits](https://github.com/docker/build-push-action/compare/v2.4.0...v2.5.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
2021-05-31 13:38:24 +02:00
dependabot[bot]
a226863aa5
chore(deps): bump docker/setup-qemu-action from 1.1.0 to 1.2.0 ( #2017 )
...
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action ) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases )
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1.1.0...v1.2.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
2021-05-31 10:40:05 +00:00
dependabot[bot]
8842ba7421
chore(deps): bump actions/cache from 2.1.5 to 2.1.6 ( #2020 )
...
Bumps [actions/cache](https://github.com/actions/cache ) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases )
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
2021-05-31 12:31:40 +02:00
Casper
d5bbcb9978
CI fix for #1972
2021-05-16 20:46:55 +02:00
Casper
17d656518c
Use buildx in test_merge_requests.yml ( #1972 )
...
* Update test_merge_requests.yml
* cache stuff removed
2021-05-16 18:54:49 +02:00
Casper
23afce5ae1
add arm platforms ( #1970 )
2021-05-15 20:36:36 +02:00
dependabot[bot]
98be3d7b82
chore(deps): bump actions/checkout from 2 to 2.3.4 ( #1964 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
2021-05-12 09:51:46 +00:00
dependabot[bot]
2f538daf0f
chore(deps): bump docker/build-push-action from 2 to 2.4.0 ( #1960 )
...
Bumps [docker/build-push-action](https://github.com/docker/build-push-action ) from 2 to 2.4.0.
- [Release notes](https://github.com/docker/build-push-action/releases )
- [Commits](https://github.com/docker/build-push-action/compare/v2...v2.4.0 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
2021-05-12 09:48:11 +00:00
Frederic Werner
d2124a6529
ci: exlude files from triggering workflows ( #1804 )
...
* ci: add paths-ignore
* fix: use explicit trigger paths
* fix: revert changes as every file should be linted
2021-02-11 09:48:45 +01:00
Nick Pappas
717aeffae8
feat: leverage cache to prevent unnecessary pushing and building ( #14 )
...
* feat: leverage cache to prevent unnecessary pushing and building
* fix: combine test build and test suite to leverage cache
* fix: revert inadvertently changed parts
* fix: review-requested changes
* fix: update test tags to use static ci tag
2021-01-17 10:41:47 -06:00
Georg Lauterbach
c31a62d2f6
fixes the PR testing problems
2021-01-16 15:34:31 +01:00
Georg Lauterbach
189e5376cc
Final Migration Step ( #6 )
...
* first migration steps
* altered issue templates
* altered README
* removed .travis.yml
* adjusting registry & repository, Dockerfile and compose.env
* Close stale issues automatically
* Integrated CI with Github Actions (#3 )
* feat: integrated ci with github actions
* fix: use secrets for docker org and update image
* docs: clarify why we use -t if no tty exists
* fix: correct remaining references to old repo
chore: prettier automatically updated markdown as well
* fix: hardcode docker org
* change testing image to just testing
* ci: add armv7 as a supported platform
* finished migration steps
* corrected linting in build-push action
* corrected linting in build-push action (2)
* minor preps for PR
* correcting push on pull request and minor details
* adjusted workflows to adhere closer to @wernerfred's diagram
* minor patches
* adjusting Dockerfile's installation of base packages
* adjusting schedule for stale issue action
* reverting license text
* improving CONTRIBUTING.md PR text
* Update CONTRIBUTING.md
* a bigger patch at the end
* moved all scripts into one directory under target/scripts/
* moved the quota-warning.sh script into target/scripts/ and removed empty directory /target/dovecot/scripts
* minor fixes here and there
* adjusted workflows for use a fully qualified name (i.e. docker.io/...)
* improved on the Dockerfile layer count
* corrected local tests - now they (actually) work (fine)!
* corrected start-mailserver.sh to make use of defaults consistently
* removed very old, deprecated variables (actually only one)
* various smaller improvements in the end
* last commit before merging #6
* rearranging variables to use alphabetic order
Co-authored-by: casperklein <casperklein@users.noreply.github.com>
Co-authored-by: Nick Pappas <radicand@users.noreply.github.com>
Co-authored-by: William Desportes <williamdes@wdes.fr>
2021-01-16 10:16:05 +01:00