From 14c5de7202bf192b3d9ff8bc51e42b50b266e2ac Mon Sep 17 00:00:00 2001 From: "Alec S." Date: Thu, 4 Dec 2025 07:23:52 +0100 Subject: [PATCH] Refactors release workflow for efficiency Optimizes the release workflow by removing the dedicated test job and streamlining the build processes. Simplifies the Docker image building steps for both backend and frontend, leveraging the latest Buildx action version and reducing redundancy. --- .github/workflows/release.yml | 41 +++++------------------------------ 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46dd726..29985d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,25 +10,7 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - test: - name: Run Tests - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.24' - - - name: Run backend tests - run: go test -v -race ./... - working-directory: backend - build-backend: - needs: test runs-on: ubuntu-latest permissions: contents: read @@ -38,9 +20,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -51,7 +30,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Backend + - name: Extract metadata for Backend id: meta uses: docker/metadata-action@v5 with: @@ -59,23 +38,20 @@ jobs: tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=latest - name: Build and push Backend Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ./backend file: ./backend/Dockerfile push: true - platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max build-frontend: - needs: test runs-on: ubuntu-latest permissions: contents: read @@ -85,9 +61,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -98,7 +71,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Frontend + - name: Extract metadata for Frontend id: meta uses: docker/metadata-action@v5 with: @@ -106,16 +79,14 @@ jobs: tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=latest - name: Build and push Frontend Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ./frontend file: ./frontend/Dockerfile push: true - platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha