Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ jobs:
make -C ${{ matrix.image }} build

- name: Login to Quay.io
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push
if: github.event_name != 'pull_request'
run: |
make -C ${{ matrix.image }} push

- name: Retag main branch and push
if: github.event_name == 'push'
run: |
make -C ${{ matrix.image }} tag-push-main
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include constants.Makefile

.PHONY: all
all: collector falco clean deploy

Expand Down
1 change: 1 addition & 0 deletions collector/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN dnf install -y epel-release && \
fzf \
inotify-tools \
podman-docker \
python-pip \
zsh && \
dnf clean all && \
# Install my dev environment
Expand Down
13 changes: 10 additions & 3 deletions collector/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
include ../constants.Makefile

BUILDER_IMAGE=quay.io/mmoltras/devcontainers:collector

.PHONY: build
build:
docker build \
--tag $(BUILDER_IMAGE) \
--tag $(BUILDER_IMAGE)-$(SUFFIX) \
-f Containerfile \
$(CURDIR)

.PHONY: push
push: build
docker push $(BUILDER_IMAGE)
docker push $(BUILDER_IMAGE)-$(SUFFIX)

.PHONY:teardown
.PHONY: teardown
teardown:
docker rm -f collector-builder

.PHONY: tag-push-main
tag-push-main: build
docker tag $(BUILDER_IMAGE)-$(SUFFIX) $(BUILDER_IMAGE)
docker push $(BUILDER_IMAGE)

.PHONY: deploy
deploy: build teardown
docker run -idP --privileged --name devcontainers-collector-builder \
Expand Down
1 change: 1 addition & 0 deletions constants.Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUFFIX ?= $(shell git rev-parse --short HEAD)
13 changes: 11 additions & 2 deletions falco-libs/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
include ../constants.Makefile

BUILDER_IMAGE=quay.io/mmoltras/devcontainers:falco-libs

.PHONY: clang-config
clang-config:
envsubst < $(CURDIR)/clangd.tpl.yaml > $(CURDIR)/clangd.yaml
Expand All @@ -9,18 +13,23 @@ clean:
.PHONY: build
build: clang-config
docker build \
--tag quay.io/mmoltras/devcontainers:falco-libs \
--tag $(BUILDER_IMAGE)-$(SUFFIX) \
-f Containerfile \
$(CURDIR)

.PHONY: push
push: build
docker push quay.io/mmoltras/devcontainers:falco-libs
docker push $(BUILDER_IMAGE)-$(SUFFIX)

.PHONY: teardown
teardown: clean
docker rm -f libs-builder

.PHONY: tag-push-main
tag-push-main: build
docker tag $(BUILDER_IMAGE)-$(SUFFIX) $(BUILDER_IMAGE)
docker push $(BUILDER_IMAGE)

.PHONY: deploy
deploy: build teardown
docker run -id --privileged --name libs-builder \
Expand Down