From cd9070ec991bd117ed224111e8ed22f93f0995bd Mon Sep 17 00:00:00 2001 From: Ryan Kegel Date: Fri, 23 Jan 2026 22:10:25 -0500 Subject: [PATCH] Refactor build workflow to separate backend and frontend image builds; enhance clarity and structure --- .gitea/workflows/build.yaml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 90dca57..3f5d791 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -15,7 +15,7 @@ jobs: - name: Determine Image Tag id: vars - run: | + run: | if [ "${{ gitea.ref }}" == "refs/heads/master" ]; then echo "tag=latest" >> $GITHUB_OUTPUT else @@ -26,11 +26,15 @@ jobs: id: gitea_ip run: | ip=$(getent hosts gitea-server | awk '{ print $1 }') - echo "ip=$ip" >> $GITHUB_OUTPUT + 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 }} \ No newline at end of file + 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 }}