Skip to content

Conversation

@externl
Copy link
Member

@externl externl commented Dec 19, 2025

No description provided.

pull_request:
branches: ["main"]
schedule:
- cron: "0 0 * * 0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we run this with cron?

Copy link
Member Author

@externl externl Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To update the underlying base container. It's good to keep the base image updated.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR transforms the CI workflow from a simple container build process into a comprehensive build-push-deploy pipeline with multi-architecture support, automated deployments, and scheduled weekly runs.

  • Adds Docker image building and pushing to both Docker Hub and GitHub Container Registry (GHCR)
  • Implements automated SSH-based deployment to a remote server
  • Includes weekly scheduled workflow runs and automated cleanup of old container images

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to +70
- name: Delete old container images
uses: actions/delete-package-versions@v5
with:
package-name: hello
package-type: container
min-versions-to-keep: 10
delete-only-untagged-versions: true
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Delete old container images" step is missing the if: github.event_name != 'pull_request' condition. Like the Deploy step, this cleanup action should only run for push and schedule events, not for pull requests where no images are pushed.

Copilot uses AI. Check for mistakes.
script_stop: true
script: |
cd /opt/hello
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub token used in the remote deployment script may not work. The ${{ secrets.GITHUB_TOKEN }} is a workflow-scoped token that typically expires after the workflow completes, and it may not be accessible from within the SSH session. Consider using a Personal Access Token (PAT) or GitHub App token stored as a secret instead.

Copilot uses AI. Check for mistakes.
@externl externl requested a review from pepone December 19, 2025 16:44
@externl externl merged commit ac95ad7 into icerpc:main Dec 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants