Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,55 @@
# -*- coding: utf-8 -*- #
# frozen_string_literal: true
module Rouge
module Lexers
class Docker < RegexLexer
title "Docker"
desc "Dockerfile syntax"
tag 'docker'
aliases 'dockerfile', 'Dockerfile', 'containerfile', 'Containerfile'
filenames 'Dockerfile', '*.Dockerfile', '*.docker', 'Containerfile', '*.Containerfile'
mimetypes 'text/x-dockerfile-config'
KEYWORDS = %w(
FROM MAINTAINER CMD LABEL EXPOSE ENV ADD COPY ENTRYPOINT VOLUME USER WORKDIR ARG STOPSIGNAL HEALTHCHECK SHELL
).join('|')
start { @shell = Shell.new(@options) }
state :root do
rule %r/\s+/, Text
rule %r/^(FROM)(\s+)(.*)(\s+)(AS)(\s+)(.*)/io do
groups Keyword, Text::Whitespace, Str, Text::Whitespace, Keyword, Text::Whitespace, Str
end
rule %r/^(ONBUILD)(\s+)(#{KEYWORDS})(.*)/io do
groups Keyword, Text::Whitespace, Keyword, Str
end
rule %r/^(#{KEYWORDS})\b(.*)/io do
groups Keyword, Str
end
rule %r/#.*?$/, Comment
rule %r/^(ONBUILD\s+)?RUN(\s+)/i do
token Keyword
push :run
@shell.reset!
end
rule %r/\w+/, Text
rule %r/[^\w]+/, Text
rule %r/./, Text
end
state :run do
rule %r/\n/, Text, :pop!
rule %r/\\./m, Str::Escape
rule(/(\\.|[^\n\\])+/) { delegate @shell }
end
end
end
end