Skip to content

Commit 1cdcf7c

Browse files
committed
change deploy.yml
1 parent 90db60c commit 1cdcf7c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ jobs:
6464
password: ${{ secrets.GITHUB_TOKEN }}
6565

6666

67+
- name: 🔧 Setup image name
68+
run: echo "IMAGE_LOWER=$(echo '${{ env.IMAGE_NAME }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
69+
70+
6771
- name: 📝 Extract metadata
6872
id: meta
6973
uses: docker/metadata-action@v5
7074
with:
71-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
75+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_LOWER }}
7276
tags: |
7377
type=ref,event=branch
7478
type=sha,prefix={{branch}}-
@@ -95,7 +99,6 @@ jobs:
9599
username: ${{ env.RASPBERRY_PI_USER }}
96100
key: ${{ secrets.RASPBERRY_PI_SSH_KEY }}
97101
port: 2022
98-
envs: MYSQL_ROOT_PASSWORD,MYSQL_DATABASE,MYSQL_USER,MYSQL_PASSWORD
99102
script: |
100103
cd /home/yoon/goormthon-java
101104
git pull origin main
@@ -110,8 +113,9 @@ jobs:
110113
111114
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
112115
113-
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64
114-
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64 dormung-springboot:latest
116+
export IMAGE_LOWER=$(echo "${{ env.IMAGE_NAME }}" | tr '[:upper:]' '[:lower:]')
117+
docker pull ${{ env.REGISTRY }}/$IMAGE_LOWER:${{ github.sha }}-arm64
118+
docker tag ${{ env.REGISTRY }}/$IMAGE_LOWER:${{ github.sha }}-arm64 dormung-springboot:latest
115119
116120
chmod +x deploy.sh
117121
./deploy.sh deploy

0 commit comments

Comments
 (0)