fix layer refs
This commit is contained in:
		
							
								
								
									
										124
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										124
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							@@ -21,68 +21,80 @@ jobs:
 | 
				
			|||||||
      run:
 | 
					      run:
 | 
				
			||||||
        working-directory: /home/runner/work/netdisco/netdisco-docker
 | 
					        working-directory: /home/runner/work/netdisco/netdisco-docker
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - name: Check out latest code
 | 
					      - name: Check out latest code
 | 
				
			||||||
      uses: actions/checkout@v1
 | 
					        uses: actions/checkout@v1
 | 
				
			||||||
      with:
 | 
					        with:
 | 
				
			||||||
        repository: 'netdisco/netdisco-docker'
 | 
					          repository: 'netdisco/netdisco-docker'
 | 
				
			||||||
        ref: 'master'
 | 
					          ref: 'master'
 | 
				
			||||||
    - name: Get the Tag
 | 
					 | 
				
			||||||
      id: get_refs
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "TAG=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
        echo "IMAGE_ROOT=netdisco:${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Build netdisco-postgresql
 | 
					      - name: Get the Tag
 | 
				
			||||||
      id: build_netdisco_postgresql
 | 
					        id: get_refs
 | 
				
			||||||
      run: |
 | 
					        run: |
 | 
				
			||||||
        cd netdisco-postgresql
 | 
					          echo "TAG=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
 | 
				
			||||||
        docker build -t ${IMAGE_ROOT}-postgresql \
 | 
					          echo "IMAGE_ROOT=netdisco:${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
 | 
				
			||||||
              --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
					 | 
				
			||||||
              --build-arg TAG=${TAG} \
 | 
					 | 
				
			||||||
              --build-arg COMMITTISH=${TAG} .
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Build netdisco-base
 | 
					      - name: Build netdisco-postgresql
 | 
				
			||||||
      id: build_netdisco_base
 | 
					        run: |
 | 
				
			||||||
      run: |
 | 
					          cd netdisco-postgresql
 | 
				
			||||||
        cd netdisco-base
 | 
					          docker build -t ${IMAGE_ROOT}-postgresql \
 | 
				
			||||||
        docker build -t ${IMAGE_ROOT}-base \
 | 
					                --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
				
			||||||
              --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
					                --build-arg TAG=${TAG} \
 | 
				
			||||||
              --build-arg TAG=${TAG} \
 | 
					                --build-arg COMMITTISH=${TAG} .
 | 
				
			||||||
              --build-arg COMMITTISH=${TAG} .
 | 
					          docker tag ${IMAGE_ROOT}-postgresql netdisco/${IMAGE_ROOT}-postgresql
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Build netdisco-backend
 | 
					      - name: Build netdisco-base
 | 
				
			||||||
      id: build_netdisco_backend
 | 
					        run: |
 | 
				
			||||||
      run: |
 | 
					          cd netdisco-base
 | 
				
			||||||
        cd netdisco-backend
 | 
					          docker build -t ${IMAGE_ROOT}-base \
 | 
				
			||||||
        docker build -t ${IMAGE_ROOT}-backend \
 | 
					                --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
				
			||||||
              --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
					                --build-arg TAG=${TAG} \
 | 
				
			||||||
              --build-arg TAG=${TAG} \
 | 
					                --build-arg COMMITTISH=${TAG} .
 | 
				
			||||||
              --build-arg COMMITTISH=${TAG} .
 | 
					          docker tag ${IMAGE_ROOT}-base netdisco/${IMAGE_ROOT}-base
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Build netdisco-web
 | 
					      - name: Build netdisco-backend
 | 
				
			||||||
      id: build_netdisco_web
 | 
					        run: |
 | 
				
			||||||
      run: |
 | 
					          cd netdisco-backend
 | 
				
			||||||
        cd netdisco-web
 | 
					          docker build -t ${IMAGE_ROOT}-backend \
 | 
				
			||||||
        docker build -t ${IMAGE_ROOT}-web \
 | 
					                --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
				
			||||||
              --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
					                --build-arg TAG=${TAG} \
 | 
				
			||||||
              --build-arg TAG=${TAG} \
 | 
					                --build-arg COMMITTISH=${TAG} .
 | 
				
			||||||
              --build-arg COMMITTISH=${TAG} .
 | 
					          docker tag ${IMAGE_ROOT}-backend netdisco/${IMAGE_ROOT}-backend
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Build netdisco-do
 | 
					      - name: Build netdisco-web
 | 
				
			||||||
      id: build_netdisco_do
 | 
					        run: |
 | 
				
			||||||
      run: |
 | 
					          cd netdisco-web
 | 
				
			||||||
        cd netdisco-do
 | 
					          docker build -t ${IMAGE_ROOT}-web \
 | 
				
			||||||
        docker build -t ${IMAGE_ROOT}-do \
 | 
					                --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
				
			||||||
              --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
					                --build-arg TAG=${TAG} \
 | 
				
			||||||
              --build-arg TAG=${TAG} \
 | 
					                --build-arg COMMITTISH=${TAG} .
 | 
				
			||||||
              --build-arg COMMITTISH=${TAG} .
 | 
					          docker tag ${IMAGE_ROOT}-web netdisco/${IMAGE_ROOT}-web
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Retag all images
 | 
					      - name: Build netdisco-do
 | 
				
			||||||
      run: |
 | 
					        run: |
 | 
				
			||||||
        for image in postgresql backend web do; do
 | 
					          cd netdisco-do
 | 
				
			||||||
          docker tag ${IMAGE_ROOT}-$image netdisco/${IMAGE_ROOT}-$image
 | 
					          docker build -t ${IMAGE_ROOT}-do \
 | 
				
			||||||
          docker tag ${IMAGE_ROOT}-$image netdisco/netdisco:latest-$image
 | 
					                --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
 | 
				
			||||||
        done
 | 
					                --build-arg TAG=${TAG} \
 | 
				
			||||||
 | 
					                --build-arg COMMITTISH=${TAG} .
 | 
				
			||||||
 | 
					          docker tag ${IMAGE_ROOT}-do netdisco/${IMAGE_ROOT}-do
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Tag all images latest
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          for image in postgresql backend web do; do
 | 
				
			||||||
 | 
					            docker tag ${IMAGE_ROOT}-$image netdisco/netdisco:latest-$image
 | 
				
			||||||
 | 
					          done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Upload all images
 | 
				
			||||||
 | 
					        if: (! github.event.inputs.debug_enabled) && startsWith(github.ref, 'refs/tags/')
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
 | 
				
			||||||
 | 
					          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
 | 
				
			||||||
 | 
					          for image in postgresql backend web do; do
 | 
				
			||||||
 | 
					              docker push netdisco/${IMAGE_ROOT}-$image
 | 
				
			||||||
 | 
					              docker push netdisco/netdisco:latest-$image
 | 
				
			||||||
 | 
					          done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#    - name: IRC upload failure notification
 | 
					#    - name: IRC upload failure notification
 | 
				
			||||||
#      uses: Gottox/irc-message-action@v2
 | 
					#      uses: Gottox/irc-message-action@v2
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user