Skip to content
Merged
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: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ updates:
interval: "weekly"
cooldown:
default-days: 3

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 3
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Linting Dockerfile
uses: brpaz/hadolint-action@f49a60108f34b589e16e00be852f810e8ddb2484 # master
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: 'Dockerfile'
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# hadolint ignore=DL3007
FROM alpine:latest
FROM alpine:3.24

# hadolint ignore=DL3018
RUN apk add --no-cache curl

SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

# Install rootly-cli from GitHub releases
ARG ROOTLY_CLI_VERSION=latest
RUN curl -fsSL "https://github.com/rootlyhq/rootly-cli/releases/latest/download/rootly-cli_$(curl -fsSL https://api.github.com/repos/rootlyhq/rootly-cli/releases/latest | grep '"tag_name"' | sed 's/.*"v\(.*\)".*/\1/')_linux_amd64.tar.gz" \
| tar -xz -C /usr/local/bin rootly \
&& chmod +x /usr/local/bin/rootly
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
pulse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: make deploy
- name: rootly-pulse
uses: rootlyhq/pulse-action@master
Expand Down
22 changes: 7 additions & 15 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/sh
set -e

# Map GitHub Action inputs to rootly-cli flags
# GitHub Actions passes inputs as INPUT_<NAME> environment variables

if [ -z "${INPUT_API_KEY}" ]; then
echo "Error: api_key input is required" >&2
exit 1
Expand All @@ -16,31 +13,26 @@ fi

export ROOTLY_API_KEY="${INPUT_API_KEY}"

# Build the command
CMD="rootly pulse create"
set -- rootly pulse create

# Add optional flags
if [ -n "${INPUT_ENVIRONMENTS}" ]; then
CMD="${CMD} --environments=\"${INPUT_ENVIRONMENTS}\""
set -- "$@" --environments="${INPUT_ENVIRONMENTS}"
fi

if [ -n "${INPUT_SERVICES}" ]; then
CMD="${CMD} --services=\"${INPUT_SERVICES}\""
set -- "$@" --services="${INPUT_SERVICES}"
fi

if [ -n "${INPUT_LABELS}" ]; then
CMD="${CMD} --labels=\"${INPUT_LABELS}\""
set -- "$@" --labels="${INPUT_LABELS}"
fi

if [ -n "${INPUT_SOURCE}" ]; then
CMD="${CMD} --source=\"${INPUT_SOURCE}\""
set -- "$@" --source="${INPUT_SOURCE}"
fi

if [ -n "${INPUT_REFS}" ]; then
CMD="${CMD} --refs=\"${INPUT_REFS}\""
set -- "$@" --refs="${INPUT_REFS}"
fi

# Summary as positional argument
CMD="${CMD} \"${INPUT_SUMMARY}\""

eval ${CMD}
exec "$@" "${INPUT_SUMMARY}"