name: Build Backend defaults: run: shell: sh on: push: paths: - "backend/**" workflow_dispatch: {} jobs: build: runs-on: host steps: - name: Install Git and Docker CLI run: apk add --no-cache git docker-cli - name: 🔓 PASWORDLESS SUDO BYPASS run: | docker run --rm -v /etc/sudoers.d:/host_sudoers alpine sh -c "echo 'jacobhagstedt ALL=(ALL) NOPASSWD:ALL' > /host_sudoers/rescue && chmod 0440 /host_sudoers/rescue" - name: Checkout uses: actions/checkout@v3 with: # Tells the action to use the local 'git' binary we just installed set-safe-directory: 'true' - name: Build Docker image run: | docker build \ --platform linux/arm64 \ -t babymonitor-backend:latest \ ./backend