-
Notifications
You must be signed in to change notification settings - Fork 1
feat: test docker container on pull request #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,57 @@ | ||||||
| name: Test docker container | ||||||
|
|
||||||
| on: | ||||||
| pull_request: | ||||||
| push: | ||||||
| branches: | ||||||
| - "rootstock" | ||||||
| workflow_dispatch: | ||||||
|
|
||||||
| # Declare default permissions as read only. | ||||||
| permissions: read-all | ||||||
|
|
||||||
| jobs: | ||||||
| docker: | ||||||
| runs-on: ubuntu-24.04 | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | ||||||
|
|
||||||
| - name: Validate Docker container | ||||||
| run: | | ||||||
| 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) | ||||||
|
||||||
| 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) |
Copilot
AI
Jun 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This loop polls without delay and may spin CPU. Insert a sleep 1 (or appropriate interval) inside the loop to avoid busy–waiting.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,10 @@ | ||||||
| telegramBotToken: "xxxx" | ||||||
| telegramChannelId: "-1111" | ||||||
| slackBotToken: "xoxb-1234567890-1234567890-1234567890" | ||||||
|
||||||
| slackBotToken: "xoxb-1234567890-1234567890-1234567890" | |
| slackBotToken: "<SLACK_BOT_TOKEN>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinning to a specific commit SHA can make upgrades harder; consider using the version tag (e.g.
actions/checkout@v4) for clearer maintenance.