Skip to content

Commit

Permalink
Update Docker Hub -> GitHub Container Registry
Browse files Browse the repository at this point in the history
Since we cannot push anymore, I removed the push-target.
  • Loading branch information
bebehei committed Mar 3, 2024
1 parent 5c4a86a commit 8288e25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
XSOCK?=/tmp/.X11-unix
DUNSTRC=${HOME}/.config/dunst/dunstrc
DOCKER_REPO?=dunst/dunst
DOCKER_REPO_CI?=dunst/ci
DOCKER_REPO_CI?=ghcr.io/dunst-project/docker-images
DOCKER_TECHNIQUE?=build
REPO=./dunst
CFLAGS?=-Werror
Expand All @@ -19,7 +19,7 @@ endif

# Structure of the makefile
#
# We have generic targets (run push pull build clean), wich
# We have generic targets (run pull build clean), wich
# depend on the image's specific target
#
# Every docker image flavor has a unique name. It is used as
Expand All @@ -37,20 +37,14 @@ IMG_CI?=$(shell find ci -name 'Dockerfile.*' | sed 's/ci\/Dockerfile\.\(.*\)/\1/
# force make to execute the find call only once
IMG_CI:=${IMG_CI}

.PHONY: all ci push pull build clean
.PHONY: all ci pull build clean
all: ci
ci: ci-run
run: ci-run
push: ci-push
pull: ci-pull
build: ci-build
clean: ci-clean

# Push all images to docker hub
ci-push: ${IMG_CI:%=ci-push-%}
ci-push-%: ci-build-%
$(DOCKER) push "${DOCKER_REPO_CI}:${@:ci-push-%=%}"

# Pull all images from docker hub
ci-pull: ${IMG_CI:%=ci-pull-%}
ci-pull-%:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Use `make` for this and point the `REPO` variable to your repository. So a `make
- **copy** the repo into the container (you local repo stays untouched)
- execute the tests in the docker image

If you do not want to build the images, but download the prebuilt ones from dockerhub, add the variable `DOCKER_TECHNIQUE=pull` to your make call.
If you do not want to build the images, but download the prebuilt ones from Github Container Registry (ghcr.io), add the variable `DOCKER_TECHNIQUE=pull` to your make call.

If you do not use docker but a replacement (with compatible CLI; e.g. [podman](https://github.com/containers/podman)), add the variable `DOCKER=podman` to your make call.

Expand All @@ -32,8 +32,7 @@ Example: `make REPO=../dunst.git ci-run-alpine`

# Other make targets

- `ci-pull`: Download all images from Docker Hub
- `ci-push`: Push the local images to Docker Hub
- `ci-pull`: Download all images from GitHub Package Registry
- `ci-build`: Build all docker images locally
- `ci-clean`: Remove all local docker images

Expand All @@ -53,5 +52,6 @@ CentOS is not supported, as [basic libraries are missing on CentOS](https://unix
# Adding new images

- Add your new `Dockerfile.<name>` in [`./ci/`](./ci) folder.
- Edit the [build settings of the project](https://hub.docker.com/repository/docker/dunst/ci/builds/edit) to have a mapping from `Dockerfile.<name>` to `dunst-project/ci:<name>`.
- In the [GitHub Action workflow](https://github.com/dunst-project/dunst/blob/master/.github/workflows/main.yml) of the main dunst project, add the new tag names in the matrix.
- Add the new `<name>` in the GitHub Actions matrix:
- In the [GitHub Action workflow](.github/workflows/main.yml) of this project.
- In the [GitHub Action workflow](https://github.com/dunst-project/dunst/blob/master/.github/workflows/main.yml) of the main dunst project

0 comments on commit 8288e25

Please sign in to comment.