diff --git a/.vscode/settings.json b/.vscode/settings.json index 18f3e6c..8ca34bc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,9 +7,13 @@ "editor.acceptSuggestionOnEnter": "off" }, "cSpell.words": [ + "aireone", "ansicolors", "awesomewm", + "buildx", + "dryrun", "getcontent", + "gitea", "htmlparser", "isdir", "justfile", @@ -26,6 +30,7 @@ "tablex", "tmpl", "wibox", + "woodpeckerci", "writefunction" ], "files.associations": { diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 0383ef3..d63e21e 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -1,6 +1,3 @@ -depends_on: - - lint - pipeline: prepare: image: akorn/luarocks:lua5.4-alpine diff --git a/.woodpecker/docker-build.yml b/.woodpecker/docker-build.yml new file mode 100644 index 0000000..6ba304e --- /dev/null +++ b/.woodpecker/docker-build.yml @@ -0,0 +1,40 @@ +variables: + - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 + - &repo gitea.aireone.xyz/${CI_REPO,,} + - &platforms linux/amd64 + +matrix: + DOCKERFILE: + - .woodpecker/docker/Dockerfile.cyan + - .woodpecker/docker/Dockerfile.luacheck_just + - .woodpecker/docker/Dockerfile.stylua_just + +pipeline: + dryrun: + image: *buildx + settings: + dockerfile: ${DOCKERFILE} + platforms: *platforms + dry_run: true + repo: *repo + when: + event: pull_request + path: ${DOCKERFILE} + + publish: + image: *buildx + settings: + dockerfile: ${DOCKERFILE} + platforms: *platforms + registry: gitea.aireone.xyz + repo: *repo + auto_tag: true + username: + from_secret: publish_username + password: + from_secret: publish_token + when: + event: push + path: ${DOCKERFILE} + +branches: master diff --git a/.woodpecker/docker/Dockerfile.cyan b/.woodpecker/docker/Dockerfile.cyan new file mode 100644 index 0000000..03eccbb --- /dev/null +++ b/.woodpecker/docker/Dockerfile.cyan @@ -0,0 +1,3 @@ +FROM akorn/luarocks:lua5.4-alpine +RUN apk add just gcc libc-dev musl-dev curl-dev +RUN luarocks install cyan diff --git a/.woodpecker/docker/Dockerfile.luacheck_just b/.woodpecker/docker/Dockerfile.luacheck_just new file mode 100644 index 0000000..1a48c1f --- /dev/null +++ b/.woodpecker/docker/Dockerfile.luacheck_just @@ -0,0 +1,2 @@ +FROM ghcr.io/lunarmodules/luacheck:v0.26.1 +RUN apk add just diff --git a/.woodpecker/docker/Dockerfile.stylua_just b/.woodpecker/docker/Dockerfile.stylua_just new file mode 100644 index 0000000..5a49718 --- /dev/null +++ b/.woodpecker/docker/Dockerfile.stylua_just @@ -0,0 +1,2 @@ +FROM alpine:edge +RUN apk add just stylua