ci: add working-tree image test and drop dead args step

- Build and smoke-test the local Dockerfile/entrypoint since the action
  now runs the published ghcr image instead of the working tree
- Exercise the empty INPUT_MESSAGE_THREAD_ID guard in the smoke test
- Remove the args step which silently sent the default message
This commit is contained in:
Bo-Yi Wu
2026-08-16 10:33:52 +08:00
parent e9e9d8fda7
commit 53d62f6c74
+23 -7
View File
@@ -1,18 +1,34 @@
name: telegram message
on: [push]
jobs:
# Tests the working-tree Dockerfile and entrypoint.sh; the build job below
# runs against the published image referenced by action.yml instead.
local-image:
name: Test local image build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: build image from working tree
run: docker build -t telegram-action:local .
- name: send message via local image
env:
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
run: |
docker run --rm \
-e INPUT_TO="$TELEGRAM_TO" \
-e INPUT_TOKEN="$TELEGRAM_TOKEN" \
-e INPUT_MESSAGE_THREAD_ID= \
-e INPUT_MESSAGE="ci: local image smoke test for ${{ github.sha }}" \
telegram-action:local
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: send custom message with args
uses: ./
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
args: The ${{ github.event_name }} event triggered first step.
- name: send message using with
uses: ./
with: