Commit Graph

43 Commits

Author SHA1 Message Date
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
dependabot[bot]
0053ccff95 build(deps): bump debian
Bumps debian from stable-20201117-slim to stable-20210511-slim.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 19:36:24 +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
4f80f973e6 fix(dev): bump curl (to buster-backports)
Workaround for a dependency conflict ...
#7 3.632 The following packages have unmet dependencies:
#7 3.692  curl : Depends: libcurl4 (= 7.64.0-4+deb10u2) but 7.74.0-1.2~bpo10+1 is to be installed
#7 3.703 E: Unable to correct problems, you have held broken packages.

This should be reverted once `cmake` no longer comes from buster-backports.

PR: #13
See: 5de32f5d18
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
a633feee38 feat(dev): add gpg & ssh
Required for remote access.

Originally from the ZMK devcontainer Dockerfile.

See: 9b29f9b861
2020-12-09 21:19:21 +00:00
innovaker
52fe7ae11f feat(dev): add clang-format
Required for formatting C.
2020-12-09 21:19:21 +00:00
innovaker
211d55488e feat(dev): add nano
Required for handling git merge conflicts.
2020-12-09 21:19:21 +00:00
innovaker
d81b73f227 feat(dev): add locales
Required for Zephyr's menuconfig.

See: zmkfirmware/zmk#438
2020-12-09 21:19:21 +00:00
innovaker
fc8dd6e5a8 feat(dev): add nodejs 14.x
Required by the ZMK documentation (docusaurus/webpack).

Sourced from NodeSource.
2020-12-09 21:19:21 +00:00
innovaker
5de32f5d18 feat(common): add newer cmake (from buster-backports)
Required by ZMK cmake boilerplate additions, namely list(PREPEND) which was introduced in cmake 3.15.x
2020-12-09 21:19:21 +00:00
innovaker
9f9bfb6983 feat: add DEBIAN_FRONTEND=noninteractive
For common and build only.  Changes back to interactive at the end of dev for end-user (developers) convenience.

Based on discussions with KemoNine.
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
innovaker
69b015a7ee add README.md 2020-12-03 10:35:13 +00:00
innovaker
fab310058f add LICENSE 2020-12-03 10:33:20 +00:00
innovaker
ddb0b96685 root 2020-11-22 17:04:54 +00:00