Skip to content

Commit

Permalink
Update docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SecretiveShell authored Dec 4, 2024
1 parent 95f71c7 commit 35be0ba
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Build and Publish Docker Image to GHCR
on:
push:
branches:
- master # Trigger this action when pushing to the main branch
- master
pull_request:
branches:
- master # Trigger on pull requests targeting the main branch
- master
workflow_dispatch:

jobs:
Expand All @@ -27,15 +27,15 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }} # Use GitHub username
password: ${{ secrets.GITHUB_TOKEN }} # GitHub token is automatically available in workflows

# Step 4: Build Docker image
# Step 4: Build Docker image with hardcoded name "mcp_bridge"
- name: Build Docker image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/my-image:${{ github.sha }} .
docker build -t ghcr.io/${{ github.repository_owner }}/mcp_bridge:${{ github.sha }} .
# Step 5: Push the Docker image to GHCR
- name: Push Docker image to GHCR
run: |
docker push ghcr.io/${{ github.repository_owner }}/my-image:${{ github.sha }}
docker push ghcr.io/${{ github.repository_owner }}/mcp_bridge:${{ github.sha }}

0 comments on commit 35be0ba

Please sign in to comment.