Skip to content

Commit 8cb78ac

Browse files
fix: lowercase lettering
1 parent 3bc0f06 commit 8cb78ac

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.github/workflows/build_docker.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
id: meta
3737
uses: docker/metadata-action@v5
3838
with:
39-
images: ghcr.io/${{ github.repository }}/${{ matrix.service }}
39+
images: ghcr.io/${{ github.repository_owner }}/team-devoops/${{ matrix.service }}
4040
tags: |
4141
type=raw,value=latest
4242
@@ -49,3 +49,11 @@ jobs:
4949
push: true
5050
tags: ${{ steps.meta.outputs.tags }}
5151
labels: ${{ steps.meta.outputs.labels }}
52+
53+
- name: Trigger Deploy Workflow
54+
if: matrix.service == 'client'
55+
uses: peter-evans/repository-dispatch@v2
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
event-type: deploy
59+
client-payload: '{"ref": "${{ github.ref }}"}'

.github/workflows/deploy_docker_aws.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Deploy Docker Images
22

33
on:
44
workflow_dispatch:
5+
workflow_run:
6+
workflows: ["Build Docker Images"]
7+
types:
8+
- completed
59
push:
610
paths:
711
- "deployment/compose.aws.yml"
@@ -17,6 +21,11 @@ jobs:
1721
- name: Checkout Code
1822
uses: actions/checkout@v4
1923

24+
- name: Debug Repository Info
25+
run: |
26+
echo "Repository Owner: ${{ github.repository_owner }}"
27+
echo "Repository: ${{ github.repository }}"
28+
2029
- name: Copy Docker Compose File From Repo to VM Host
2130
uses: appleboy/[email protected]
2231
with:
@@ -49,17 +58,17 @@ jobs:
4958
echo "Debug: Listing directory contents..."
5059
ls -la /home/${{ vars.AWS_EC2_USER }}
5160
echo "Debug: Updating image names in compose file..."
52-
sed -i "s|ghcr.io/aet-devops25/w05-template|ghcr.io/${{ github.repository }}|g" /home/${{ vars.AWS_EC2_USER }}/deployment/compose.aws.yml
61+
sed -i "s|ghcr.io/aet-devops25/w05-template|ghcr.io/${{ github.repository_owner }}/team-devoops|g" /home/${{ vars.AWS_EC2_USER }}/deployment/compose.aws.yml
5362
echo "Debug: Checking compose file..."
5463
cat /home/${{ vars.AWS_EC2_USER }}/deployment/compose.aws.yml
5564
echo "Logging into Docker registry..."
5665
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
5766
echo "Verifying images exist..."
58-
docker pull ghcr.io/${{ github.repository }}/client:latest || echo "Client image not found"
59-
docker pull ghcr.io/${{ github.repository }}/gateway:latest || echo "Gateway image not found"
60-
docker pull ghcr.io/${{ github.repository }}/chat:latest || echo "Chat image not found"
61-
docker pull ghcr.io/${{ github.repository }}/matching:latest || echo "Matching image not found"
62-
docker pull ghcr.io/${{ github.repository }}/user:latest || echo "User image not found"
67+
docker pull ghcr.io/${{ github.repository_owner }}/team-devoops/client:latest || echo "Client image not found"
68+
docker pull ghcr.io/${{ github.repository_owner }}/team-devoops/gateway:latest || echo "Gateway image not found"
69+
docker pull ghcr.io/${{ github.repository_owner }}/team-devoops/chat:latest || echo "Chat image not found"
70+
docker pull ghcr.io/${{ github.repository_owner }}/team-devoops/matching:latest || echo "Matching image not found"
71+
docker pull ghcr.io/${{ github.repository_owner }}/team-devoops/user:latest || echo "User image not found"
6372
echo "Starting Docker Compose..."
6473
cd /home/${{ vars.AWS_EC2_USER }}
6574
docker compose -f deployment/compose.aws.yml --env-file=.env.prod up --pull=always -d

0 commit comments

Comments
 (0)