mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			62 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Docker Build
 | 
						|
 | 
						|
on:
 | 
						|
  workflow_dispatch:
 | 
						|
  push:
 | 
						|
    branches: [ main, master ]
 | 
						|
    tags: [ 'v*' ]
 | 
						|
 | 
						|
concurrency:
 | 
						|
  group: ${{ github.workflow }}-${{ github.ref }}
 | 
						|
  cancel-in-progress: true
 | 
						|
 | 
						|
permissions:
 | 
						|
  contents: read
 | 
						|
  packages: write
 | 
						|
 | 
						|
env:
 | 
						|
  REGISTRY: ghcr.io
 | 
						|
  IMAGE_NAME: ${{ github.repository }}
 | 
						|
 | 
						|
jobs:
 | 
						|
  build-docker:
 | 
						|
    name: Build Docker Package
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    steps:
 | 
						|
      - uses: actions/checkout@v5
 | 
						|
        with:
 | 
						|
          fetch-depth: 0
 | 
						|
 | 
						|
      - name: Set up Docker Buildx
 | 
						|
        uses: docker/setup-buildx-action@v3
 | 
						|
 | 
						|
      - name: Login to GitHub Container Registry
 | 
						|
        uses: docker/login-action@v3
 | 
						|
        with:
 | 
						|
          registry: ${{ env.REGISTRY }}
 | 
						|
          username: ${{ github.actor }}
 | 
						|
          password: ${{ secrets.GITHUB_TOKEN }}
 | 
						|
 | 
						|
      - name: Docker metadata
 | 
						|
        id: meta
 | 
						|
        uses: docker/metadata-action@v5
 | 
						|
        with:
 | 
						|
          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
 | 
						|
          tags: |
 | 
						|
            type=ref,event=tag
 | 
						|
            type=ref,event=branch
 | 
						|
            type=semver,pattern={{version}}
 | 
						|
            type=semver,pattern={{major}}.{{minor}}
 | 
						|
            type=semver,pattern={{major}}
 | 
						|
 | 
						|
      - name: Build and push
 | 
						|
        uses: docker/build-push-action@v6
 | 
						|
        id: docker_build
 | 
						|
        with:
 | 
						|
          context: .
 | 
						|
          file: ./contrib/docker/Dockerfile.multiarch
 | 
						|
          platforms: linux/amd64,linux/arm64,linux/armhf,linux/armel
 | 
						|
          push: true
 | 
						|
          tags: ${{ steps.meta.outputs.tags }}
 | 
						|
          labels: ${{ steps.meta.outputs.labels }}
 | 
						|
          provenance: false
 |