unclesp1d3r/CipherSwarm

View on GitHub
.github/workflows/docker-deploy.yml

Summary

Maintainability
Test Coverage
name: Docker Deploy

on:
  push:
    tags: [ v* ]

env:
  REGISTRY: ghcr.io
  IMAGE_NAME: ${{ github.repository }}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3
        with: { platforms: "amd64,arm64" }
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3.6.1
      - name: Log into the Container registry
        uses: docker/login-action@v3.3.0
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.DOCKER_PUSH_TOKEN }}
      - name: Extract metadata for the Docker image
        id: meta
        uses: docker/metadata-action@v5.5.1
        with: { images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" }

      - name: Build and push the Docker image
        uses: docker/build-push-action@v6.9.0
        with:
          context: .
          platforms: linux/amd64,linux/arm64
          pull: true
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}