Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Production - Build and Push Docker Image | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [released, prereleased] | |
| env: | |
| # dummy database url for build time --> prisma | |
| DATABASE_URL: file:./dev.db | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies for backend | |
| run: yarn install && yarn run prisma-generate | |
| - name: Run tests for backend | |
| run: yarn test | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: ${{ needs.test.result == 'success' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| - name: Build and Push Docker Image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./ | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: | | |
| VERSION_ARG=${{ github.ref_name }} | |
| tags: | | |
| quickstack/quickstack:latest | |
| quickstack/quickstack:${{ github.ref_name }} | |
| build-and-push-mongodb-backup: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: ${{ needs.test.result == 'success' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| - name: Build and Push MongoDB Backup (amd64) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./additional-containers/mongodb-backup | |
| file: ./additional-containers/mongodb-backup/Dockerfile.amd64 | |
| push: true | |
| platforms: linux/amd64 | |
| build-args: | | |
| VERSION_ARG=${{ github.ref_name }} | |
| tags: | | |
| quickstack/job-backup-mongodb:latest-amd64 | |
| - name: Build and Push MongoDB Backup (arm64) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./additional-containers/mongodb-backup | |
| file: ./additional-containers/mongodb-backup/Dockerfile.arm64 | |
| push: true | |
| platforms: linux/arm64 | |
| build-args: | | |
| VERSION_ARG=${{ github.ref_name }} | |
| tags: | | |
| quickstack/job-backup-mongodb:latest-arm64 | |
| - name: Create multi-arch manifest (latest) | |
| run: | | |
| docker buildx imagetools create -t quickstack/job-backup-mongodb:latest \ | |
| quickstack/job-backup-mongodb:latest-amd64 \ | |
| quickstack/job-backup-mongodb:latest-arm64 | |
| docker buildx imagetools inspect quickstack/job-backup-mongodb:latest | |
| build-and-push-postgres-backup: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: ${{ needs.test.result == 'success' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| - name: Build and Push PostgreSQL Backup (amd64) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./additional-containers/postgres-backup | |
| file: ./additional-containers/postgres-backup/Dockerfile.amd64 | |
| push: true | |
| platforms: linux/amd64 | |
| build-args: | | |
| VERSION_ARG=${{ github.ref_name }} | |
| tags: | | |
| quickstack/job-backup-postgres:latest-amd64 | |
| - name: Build and Push PostgreSQL Backup (arm64) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./additional-containers/postgres-backup | |
| file: ./additional-containers/postgres-backup/Dockerfile.arm64 | |
| push: true | |
| platforms: linux/arm64 | |
| build-args: | | |
| VERSION_ARG=${{ github.ref_name }} | |
| tags: | | |
| quickstack/job-backup-postgres:latest-arm64 | |
| - name: Create multi-arch manifest (latest) | |
| run: | | |
| docker buildx imagetools create -t quickstack/job-backup-postgres:latest \ | |
| quickstack/job-backup-postgres:latest-amd64 \ | |
| quickstack/job-backup-postgres:latest-arm64 | |
| docker buildx imagetools inspect quickstack/job-backup-postgres:latest | |
| build-and-push-mariadb-backup: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: ${{ needs.test.result == 'success' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| - name: Build and Push MariaDB Backup (amd64) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./additional-containers/mariadb-backup | |
| file: ./additional-containers/mariadb-backup/Dockerfile.amd64 | |
| push: true | |
| platforms: linux/amd64 | |
| build-args: | | |
| VERSION_ARG=${{ github.ref_name }} | |
| tags: | | |
| quickstack/job-backup-mariadb:latest-amd64 | |
| - name: Build and Push MariaDB Backup (arm64) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: ./additional-containers/mariadb-backup | |
| file: ./additional-containers/mariadb-backup/Dockerfile.arm64 | |
| push: true | |
| platforms: linux/arm64 | |
| build-args: | | |
| VERSION_ARG=${{ github.ref_name }} | |
| tags: | | |
| quickstack/job-backup-mariadb:latest-arm64 | |
| - name: Create multi-arch manifest (latest) | |
| run: | | |
| docker buildx imagetools create -t quickstack/job-backup-mariadb:latest \ | |
| quickstack/job-backup-mariadb:latest-amd64 \ | |
| quickstack/job-backup-mariadb:latest-arm64 | |
| docker buildx imagetools inspect quickstack/job-backup-mariadb:latest |