Commit Graph

33 Commits

Author SHA1 Message Date
innovaker
7426042429 fix: refactor namespaces back into steps
Further testing has suggested that GitHub Actions sanitizes any secrets in job outputs.  The namespace definitions must therefore be duplicated across each job that needs them.

PR: #47
See: b65d7974a2
See: 7cf9196c14
2021-05-19 13:52:00 +01:00
innovaker
2f991a1709 refactor: split docker job into candidates and releases
This design approach has improved separation of concerns with minimal repetition.  It's also easier to refactor.

PR: #41
2021-05-18 20:04:04 +01:00
innovaker
5b98c4d20c refactor: move repository-name into a dedicated step
Completes laying the groundwork for splitting the `docker` job into `candidates` and `releases`.

PR: #41
2021-05-18 20:04:04 +01:00
innovaker
82f80a41f6 refactor: move tags into its own job
Lays the groundwork for splitting the `docker` job into `candidates` and `releases`.

PR: #41
2021-05-18 20:04:04 +01:00
innovaker
7cf9196c14 refactor: move ghcr namespace to the namespaces job
Lays the groundwork for splitting the `docker` job into `candidates` and `releases`.

PR: #41
2021-05-18 20:04:04 +01:00
innovaker
b65d7974a2 refactor: move docker-hub-namespace into a namespaces job
Lays the groundwork for splitting the `docker` job into `candidates` and `releases`.

PR: #41
2021-05-18 20:04:04 +01:00
innovaker
40f6d7bf50 refactor: move credentials checks into their own job
Lays the groundwork for splitting the `docker` job into `candidates` and `releases`.

PR: #41
2021-05-18 20:04:04 +01:00
innovaker
0df3be0b73 refactor: remove repository-name from tags
Prerequisite for splitting the `docker` job into `candidates` and `releases`.

PR: #41
2021-05-18 20:04:04 +01:00
innovaker
79d41ac9e5 refactor: extract archtectures to yml
Opens the door to running the same matrix across multiple jobs.

PR: #41
2021-05-18 20:04:04 +01:00
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
709778513f feat(dependabot): set interval(s) to daily
See: dependabot/dependabot-core#2306
2020-12-17 12:05:58 +00: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
688ae7dcd6 build: add dependabot for docker and github-actions
This should notify us of dependency updates on a weekly basis.
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