Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:

- name: Login to GHCR
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io \
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io \
-u "${{ github.actor }}" --password-stdin
Comment on lines +23 to +25
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The Docker login command has a syntax error. Lines 23-24 are incomplete commands that are missing proper continuation. The first line has an echo statement with a backslash but no actual docker login command, and the second line echoes a different secret but also doesn't complete properly. This will cause the workflow to fail during execution.

The correct approach is to use a single docker login command with one authentication token. You should either use GITHUB_TOKEN or GHCR_PAT, not both simultaneously. Line 26 shows the correct pattern.

Suggested change
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io \
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io \
-u "${{ github.actor }}" --password-stdin

Copilot uses AI. Check for mistakes.
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
Comment on lines +23 to 26
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

There are now duplicate Docker login attempts with different credentials. Lines 23-25 appear to be attempting two different logins (one with GITHUB_TOKEN, one with GHCR_PAT), followed by line 26 which contains another complete login command with GHCR_PAT. This creates confusion and redundancy.

You should keep only one docker login command. If GHCR_PAT is configured, use that. Otherwise, GITHUB_TOKEN should be sufficient for pushing to GitHub Container Registry.

Suggested change
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io \
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io \
-u "${{ github.actor }}" --password-stdin
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
if [ -n "${{ secrets.GHCR_PAT }}" ]; then
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
else
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
fi

Copilot uses AI. Check for mistakes.
Comment on lines +23 to 26
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The step name has been changed from "Login to GHCR" to "Log in to GHCR" but the implementation has critical syntax errors. The original working implementation on line 26 should be preserved. For GitHub Container Registry authentication, GITHUB_TOKEN (which is automatically provided by GitHub Actions) is typically sufficient and is the recommended approach unless specific GHCR_PAT permissions are required.

Suggested change
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io \
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io \
-u "${{ github.actor }}" --password-stdin
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

Copilot uses AI. Check for mistakes.

- name: Build Docker image
Expand Down