feat: release docker images
This commit is contained in:
		
							parent
							
								
									e6032a2039
								
							
						
					
					
						commit
						f7a1685fa2
					
				@ -17,8 +17,8 @@ jobs:
 | 
			
		||||
          CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo clippy -- -Dwarnings && \
 | 
			
		||||
          CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo clippy --tests -- -Dwarnings && \
 | 
			
		||||
          CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo test
 | 
			
		||||
  deploy:
 | 
			
		||||
    name: deploy
 | 
			
		||||
  docker:
 | 
			
		||||
    name: docker
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    needs: [tests]  # require tests to pass before deploy runs
 | 
			
		||||
    container:
 | 
			
		||||
@ -38,3 +38,20 @@ jobs:
 | 
			
		||||
      run: |
 | 
			
		||||
        docker build . -t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_frontend:${{steps.git.outputs.short_hash}} --build-arg GITEA_TOKEN="Bearer ${{secrets.DEPLOYMENT_PACKAGE}}" && \
 | 
			
		||||
        docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_frontend:${{steps.git.outputs.short_hash}}
 | 
			
		||||
  stage_deployment:
 | 
			
		||||
    name: stage-deployment
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    needs: [docker]  # require tests to pass before deploy runs
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Install kustomize
 | 
			
		||||
      run: |
 | 
			
		||||
        apt-get update && apt-get install -y curl && curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"  | bash
 | 
			
		||||
    - uses: https://github.com/actions/checkout.git@v4
 | 
			
		||||
      with:
 | 
			
		||||
        ssh: '${{ secrets.VLACH_XYZ_DEPLOY }}'
 | 
			
		||||
        path: 'vlach_xyz_deploy'
 | 
			
		||||
        repository: 'git@git.nanobyte.cz:ovlach/vlach_xyz.git'
 | 
			
		||||
        ref: 'master'
 | 
			
		||||
    - name: Update images
 | 
			
		||||
      run: |
 | 
			
		||||
        cd vlach_xyz_deploy && kustomize edit set image web=git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/ovlach_frontend:${{steps.git.outputs.short_hash}} && git add . && git commit -m "upgrade ovlach_frontend -> ${{steps.git.outputs.short_hash}}" && git push origin master
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user