Refactor build workflow to separate backend and frontend image builds; enhance clarity and structure
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 36s
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 36s
This commit is contained in:
@@ -28,9 +28,13 @@ jobs:
|
||||
ip=$(getent hosts gitea-server | awk '{ print $1 }')
|
||||
echo "ip=$ip" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build Docker Image
|
||||
- name: Build Backend Docker Image
|
||||
run: |
|
||||
docker build -t ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/chore:${{ steps.vars.outputs.tag }} .
|
||||
docker build -t ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/backend:${{ steps.vars.outputs.tag }} ./backend
|
||||
|
||||
- name: Build Frontend Docker Image
|
||||
run: |
|
||||
docker build -t ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/frontend:${{ steps.vars.outputs.tag }} ./frontend/vue-app
|
||||
|
||||
- name: Log in to Registry
|
||||
uses: docker/login-action@v2
|
||||
@@ -39,6 +43,10 @@ jobs:
|
||||
username: ryan #${{ secrets.REGISTRY_USERNAME }} # Stored as a Gitea secret
|
||||
password: 0x013h #${{ secrets.REGISTRY_TOKEN }} # Stored as a Gitea secret (use a PAT here)
|
||||
|
||||
- name: Push Image to Gitea Registry
|
||||
- name: Push Backend Image to Gitea Registry
|
||||
run: |
|
||||
docker push ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/chore:${{ steps.vars.outputs.tag }}
|
||||
docker push ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/backend:${{ steps.vars.outputs.tag }}
|
||||
|
||||
- name: Push Frontend Image to Gitea Registry
|
||||
run: |
|
||||
docker push ${{ steps.gitea_ip.outputs.ip }}:3000/ryan/frontend:${{ steps.vars.outputs.tag }}
|
||||
|
||||
Reference in New Issue
Block a user