- docker action
- 打印环境变量和evnet payload
- license/readme是常规操作
- 是一个docker action
- 元数据并不是通过action.yml展示的,而是写在Dockerfile中
FROM alpine
LABEL "repository"="http://github.com/hmarr/debug-action"
LABEL "homepage"="http://github.com/hmarr/debug-action"
LABEL "maintainer"="Harry Marr <[email protected]>"
LABEL "com.github.actions.name"="Debug Action"
LABEL "com.github.actions.description"="Log the action's environment variables and event payload"
LABEL "com.github.actions.icon"="code"
LABEL "com.github.actions.color"="yellow"
RUN apk --no-cache add jq
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
- Dockderfile就配置了一个jq工具(格式化json的工具)
#!/bin/sh
set -e
echo
echo "-- Environment variables ----------------------------------------------"
env
echo "-----------------------------------------------------------------------"
echo
echo "-- Event JSON ---------------------------------------------------------"
cat "$GITHUB_EVENT_PATH" | jq -M .
echo "-----------------------------------------------------------------------"
echo