Skip to content

Commit aeebb8d

Browse files
committed
fix deploy.yml USERNAME
1 parent 9081308 commit aeebb8d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,26 @@ jobs:
3030
username: ${{ secrets.REGISTRY_USERNAME }}
3131
password: ${{ secrets.REGISTRY_TOKEN }}
3232

33+
- name: Set lowercase username
34+
run: echo "USERNAME=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
35+
3336
- name: Build and Push Docker Image
3437
uses: docker/build-push-action@v6
3538
with:
3639
context: .
3740
file: Dockerfile
3841
push: true
39-
tags: ${{ secrets.CUSTOM_REGISTRY_URL }}/${USERNAME}/ai-org-chart-builder:${{ github.ref_name }}
42+
tags: ${{ secrets.CUSTOM_REGISTRY_URL }}/${{ env.USERNAME }}/ai-org-chart-builder:${{ github.ref_name }}
4043

4144
- name: Trigger Server Restart Webhook
4245
run: |
46+
echo "Deploying branch: ${{ github.ref_name }}"
4347
if [ "${{ github.ref_name }}" = "main" ]; then
4448
curl -X POST "${{ secrets.WEBHOOK_URL_MAIN }}"
4549
elif [ "${{ github.ref_name }}" = "next" ]; then
4650
curl -X POST "${{ secrets.WEBHOOK_URL_NEXT }}"
4751
elif [ "${{ github.ref_name }}" = "test" ]; then
4852
curl -X POST "${{ secrets.WEBHOOK_URL_NEXT }}"
53+
else
54+
echo "No webhook for branch ${{ github.ref_name }}"
4955
fi

0 commit comments

Comments
 (0)