37 lines
		
	
	
		
			804 B
		
	
	
	
		
			YAML
		
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			804 B
		
	
	
	
		
			YAML
		
	
	
name: e2e
 | 
						|
 | 
						|
on:
 | 
						|
  push:
 | 
						|
    branches:
 | 
						|
      - main
 | 
						|
  pull_request:
 | 
						|
    branches:
 | 
						|
      - main
 | 
						|
 | 
						|
jobs:
 | 
						|
  run-e2e-test:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    steps:
 | 
						|
      -
 | 
						|
        name: Checkout
 | 
						|
        uses: actions/checkout@v2
 | 
						|
        with:
 | 
						|
          fetch-depth: 0
 | 
						|
      -
 | 
						|
        name: Build image
 | 
						|
        uses: docker/bake-action@v1
 | 
						|
        with:
 | 
						|
          targets: image-local
 | 
						|
      -
 | 
						|
        name: Start distribution server
 | 
						|
        run: |
 | 
						|
          IP=`hostname -I | awk '{print $1}'`
 | 
						|
          echo "IP=$IP" >> $GITHUB_ENV
 | 
						|
          echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json
 | 
						|
          sudo service docker restart
 | 
						|
          docker run --rm -p 5000:5000 -p 5001:5001 -idt "registry:local"          
 | 
						|
      -
 | 
						|
        name: Tests
 | 
						|
        run: |
 | 
						|
          bash ./tests/push.sh $IP          
 |