mirror of
				https://github.com/fradelg/docker-mysql-cron-backup.git
				synced 2025-11-03 21:48:58 +00:00 
			
		
		
		
	add github action for multiarch docker build
This commit is contained in:
		
					parent
					
						
							
								9eda7058f1
							
						
					
				
			
			
				commit
				
					
						37c242b292
					
				
			
		
					 1 changed files with 30 additions and 0 deletions
				
			
		
							
								
								
									
										30
									
								
								.github/workflows/image.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/image.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
name: build docker image
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - "!*"
 | 
			
		||||
    tags:
 | 
			
		||||
      - "v*"
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout the code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
      - name: Install buildx
 | 
			
		||||
        id: buildx
 | 
			
		||||
        uses: crazy-max/ghaction-docker-buildx@v1
 | 
			
		||||
        with:
 | 
			
		||||
          version: latest
 | 
			
		||||
      - name: Get latest release version number
 | 
			
		||||
        id: get_version
 | 
			
		||||
        uses: battila7/get-version-action@v2
 | 
			
		||||
      - name: Login to Docker Hub
 | 
			
		||||
        run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
 | 
			
		||||
      - name: Build multiarch image
 | 
			
		||||
        run: |
 | 
			
		||||
          docker buildx build --push \
 | 
			
		||||
            --tag fradelg/mysql-cron-backup:{{ steps.get_version.outputs.version-without-v }} \
 | 
			
		||||
            --platform linux/amd64,linux/arm/v7,linux/arm64 .
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue