From 4428a6a7d180138c113aa13c199d7b8190f04e47 Mon Sep 17 00:00:00 2001 From: Daniel Popoola Date: Sun, 12 Apr 2026 12:05:16 +0100 Subject: [PATCH] feat: add load test image build and push steps to CI/CD workflow --- .github/workflows/deploy.yml | 42 +++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d4fe28f..c68be50 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,10 +35,8 @@ jobs: permissions: contents: read packages: write - outputs: image: ${{ steps.meta.outputs.tags }} - steps: - uses: actions/checkout@v4 @@ -58,17 +56,49 @@ jobs: type=sha,prefix=sha- type=raw,value=latest - - name: Build and push Docker image + - name: Build and push production image uses: docker/build-push-action@v5 with: context: . push: true tags: ${{ steps.meta.outputs.tags }} + build-loadtest: + needs: test + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for load test image + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-loadtest + tags: | + type=sha,prefix=sha- + type=raw,value=latest + + - name: Build and push load test image + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.loadtest + push: true + tags: ${{ steps.meta.outputs.tags }} + deploy: needs: build runs-on: ubuntu-latest - steps: - name: Deploy to VPS uses: appleboy/ssh-action@v1 @@ -79,9 +109,5 @@ jobs: fingerprint: ${{ secrets.VPS_SSH_FINGERPRINT }} script: | cd ~/fairqueue - - # Pull the latest image docker compose pull app - - # Attempt zero-downtime restart; may cause brief interruption on single replica docker compose up -d --no-deps app \ No newline at end of file