Commit Graph

22 Commits

Author SHA1 Message Date
innovaker
dcdbf26dc6 refactor: rename name to repository-name
`name` is too ambiguous.

PR: #39
2021-05-17 20:13:39 +01:00
innovaker
45e2982c07 feat: add OCI image.revision label
`image.revision` helps trace the image.

PR: #34
2021-05-17 20:12:56 +01:00
innovaker
1f005cd108 refactor: reorder git-tag job's if statement
Improves the readability and consistency.

PR: #36
2021-05-17 20:12:14 +01:00
innovaker
30e68c8be2 refactor: change git-tag job's needs syntax to list
List syntax is better for version control.

PR: #36
2021-05-17 20:12:14 +01:00
innovaker
18a92c3f0a refactor: rename git job to git-tag
`git-tag` is more meaningful than `git`.

PR: #36
2021-05-17 20:12:14 +01:00
innovaker
57a8ac1373 refactor: replace types with jobs
`jobs` is more accurate and understandable.

PR: #40
2021-05-17 20:08:40 +01:00
innovaker
f5bf7843a0 refactor: change tag-trigger-ref into release-trigger-tag
Improves the readability of the workflow.

PR: #37
2021-05-17 20:08:05 +01:00
innovaker
ae59587197 refactor: remove image digest step
The digest is already available within the `build-push` step.

PR: #33
2021-05-17 20:07:16 +01:00
innovaker
bb5f036706 refactor: swap Docker Hub steps with GHCR steps
Aligns with the ordering elsewhere.

PR: #32
2021-05-17 20:04:52 +01:00
innovaker
5e0400cd2f refactor: remove build registry cache
`build` is a subset of `dev`, so there's no need to save both to the registry with `mode=max`.

PR: #35
2021-05-17 20:04:07 +01:00
innovaker
955a1757a1 feat: restrict concurrency of containers workflow
Protects the cache by queuing workflow runs.

PR: #38
2021-05-17 20:02:21 +01:00
innovaker
7b71139613 feat: add guards for absent registry credentials
The original design assumed that every user would configure login credentials with appropriate write permissions for the Docker Hub repository.  Consequently, forks or pull requests fail on the first step.

This change allows the build to complete without login credentials.  It skips pushing the cache or pushing the candidate image.

The release (docker tag) step still requires login credentials and fails if they are absent.  This guarantees that git tagging is only possible once all images have been pushed out to all container registries.

PR: #24
2021-05-17 19:19:23 +01:00
innovaker
560e9163d5 feat: add fallback for Docker Hub namespace (GitHub repository owner)
Lets the workflow run without specifying the `DOCKER_HUB_NAMESPACE` secret.  It uses `github.repository_owner` as the default value for the Docker Hub namespace.

PR: #23
2021-05-17 19:19:23 +01:00
innovaker
f57ad048fa refactor: rename Tag step to Release
Improves the readability of the workflow.

PR: #22
2021-05-17 19:19:23 +01:00
innovaker
bca57f3ef0 refactor: rename DockerHub to Docker Hub
Aligns with Docker's official documentation.

PR: #21
2021-05-17 19:19:23 +01:00
innovaker
3f5e23723c refactor: remove CACHE_FROM and CACHE_TO
Having these in the `vars` step provides little benefit going forward.  Moving them to the `build-push` step improves the readability.

PR: #20
2021-05-17 19:19:23 +01:00
innovaker
a8cc84717b refactor: move zmk-docker-cache to env
Simplifies future refactoring.

PR: #20
2021-05-17 19:19:23 +01:00
innovaker
58b8d8ab6d refactor: remove matrix.cache-to
`matrix.cache-to` is superfluous because it's always the same as the target.  This was probably a hangover from an earlier design.

PR: #20
2021-05-17 19:19:23 +01:00
innovaker
5ef22c1759 refactor: remove push from cache-from and cache-to
`push` has no meaning in the context of `cache-from` or `cache-to`.

PR: #20
2021-05-17 19:19:23 +01:00
innovaker
7f4cdc99ef refactor: move OCI image.source LABEL out of Dockerfile
Defining the LABEL via an ARG at the top of the Dockerfile prevents other GitHub repositories (or local Docker users) from leveraging otherwise identical cache layers.

PR: #18
2021-05-17 19:19:23 +01:00
innovaker
55c56f6541 feat: Zephyr 2.4.0 & SDK 0.11.4
Based on:
https://docs.zephyrproject.org/2.4.0/getting_started/index.html
https://docs.zephyrproject.org/2.4.0/getting_started/installation_linux.html#install-requirements-and-dependencies
2020-12-09 21:19:21 +00:00
innovaker
145bdc8aef feat: Zephyr 2.3.0 & SDK 0.11.4
Foundation version of GitHub workflow and Dockerfile.

Based on:
https://docs.zephyrproject.org/2.3.0/getting_started/index.html
https://docs.zephyrproject.org/2.3.0/getting_started/installation_linux.html#install-requirements-and-dependencies
+ SDK 0.11.4
2020-12-09 21:18:53 +00:00