-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 1.01 KB
/
Makefile
File metadata and controls
40 lines (31 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
ACT_IMAGE ?= efrecon/act:v0.2.80
WORKDIR ?= /work
UID_GID := $(shell id -u):$(shell id -g)
DOCKER_GID := $(shell stat -c '%g' /var/run/docker.sock)
PLATFORM ?= -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-24.04
# Secrets-File in ENV format
SECRETS ?= --secret-file .secrets
ACT_ARGS ?= \
--artifact-server-path /home/act/.cache/artifacts
define DOCKER_RUN
docker run --rm -it \
-u $(UID_GID) \
--group-add $(DOCKER_GID) \
-e HOME=/home/act \
-e XDG_CACHE_HOME=/home/act/.cache \
-e ACT_CACHE_DIR=/home/act/.cache/actcache \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(PWD):$(WORKDIR) -w $(WORKDIR) \
-v $$HOME/.cache:/home/act/.cache \
$(ACT_IMAGE)
endef
# ---- Targets ----
.PHONY: all ci clean
all: ci clean
ci: ## Standard-Event "push"
$(DOCKER_RUN) $(PLATFORM) $(SECRETS) $(ACT_ARGS) 2>&1 | tee /tmp/act-output.log; \
echo ""; \
echo "=== 🏁 Summary ==="; \
grep "🏁" /tmp/act-output.log || true
clean:
docker rm -f $$(docker ps -aq --filter "name=act-") 2>/dev/null || true