feat: test docker container on pull request#59
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
There was a problem hiding this comment.
Pull Request Overview
Adds Slack credentials and example address/signers to the sample config, and introduces a GitHub Actions workflow to build and smoke–test the Docker container on PRs.
- Expanded
config.example.yamlwith Slack tokens, channel IDs, and extra safe addresses/signers. - Added
.github/workflows/docker.ymlto validate Docker build and container startup logs.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| config.example.yaml | Updated example config with Slack settings and extra entries for safeAddresses and signers |
| .github/workflows/docker.yml | New workflow to build the Docker image and verify healthcheck log output |
Comments suppressed due to low confidence (2)
config.example.yaml:8
- [nitpick] The signer value "Alice" uses title case, while existing entries use lowercase (e.g. "alice"). Consider normalizing casing to maintain consistency.
"0x1234567890123456789012345678901234567890": "Alice"
config.example.yaml:6
- The YAML mapping here is invalid: you have a scalar list entry with a colon inside quotes and no proper mapping structure. Consider using a mapping under
safeAddressesinstead of a quoted string.
- "rsk:0x0000000000000000000000000000000000000001": "Safe 1"
| @@ -1,7 +1,10 @@ | |||
| telegramBotToken: "xxxx" | |||
| telegramChannelId: "-1111" | |||
| slackBotToken: "xoxb-1234567890-1234567890-1234567890" | |||
There was a problem hiding this comment.
Use placeholder syntax (e.g. <SLACK_BOT_TOKEN>) instead of a realistic-looking token to avoid confusion and accidental leaks.
| slackBotToken: "xoxb-1234567890-1234567890-1234567890" | |
| slackBotToken: "<SLACK_BOT_TOKEN>" |
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 |
There was a problem hiding this comment.
Pinning to a specific commit SHA can make upgrades harder; consider using the version tag (e.g. actions/checkout@v4) for clearer maintenance.
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
| uses: actions/checkout@v4.2.2 |
| set -e | ||
|
|
||
| docker build -t safe-watcher:latest . | ||
| container_id=$(docker run -d --name safe-watcher-container -v $(pwd)/config.example.yaml:/app/config.yaml safe-watcher:latest) |
There was a problem hiding this comment.
Add the --rm flag to docker run to automatically clean up the container after stopping, avoiding leftover containers on the runner.
| container_id=$(docker run -d --name safe-watcher-container -v $(pwd)/config.example.yaml:/app/config.yaml safe-watcher:latest) | |
| container_id=$(docker run -d --rm --name safe-watcher-container -v $(pwd)/config.example.yaml:/app/config.yaml safe-watcher:latest) |
| attempts=0 | ||
| count=0 | ||
|
|
||
| while [ $attempts -lt $max_attempts ]; do |
There was a problem hiding this comment.
This loop polls without delay and may spin CPU. Insert a sleep 1 (or appropriate interval) inside the loop to avoid busy–waiting.
1fc1943 to
9154c71
Compare
Test docker container on pull request using example config which was also updated.