name: Build Docker Image on: push: tags: - 'v*' branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - name: Install dependencies run: npm ci - name: Build application run: npm run build - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build Docker image uses: docker/build-push-action@v5 with: context: . push: false load: true tags: configucci:latest cache-from: type=gha cache-to: type=gha,mode=max - name: Save Docker image as tarball run: docker save configucci:latest -o configucci.tar - name: Upload Docker image artifact uses: actions/upload-artifact@v4 with: name: docker-image path: configucci.tar retention-days: 30