forked from External/greenlight
		
	GRN2-346: Move cd from travis to github (#2498)
* Move cd from travis to github * Fix build args
This commit is contained in:
		
							
								
								
									
										30
									
								
								.github/workflows/cd-push.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/cd-push.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| env: | ||||
|   RUBY_VERSION: 2.7.2 | ||||
|  | ||||
|  | ||||
| name: CD | ||||
| on: | ||||
|   push: | ||||
|     branches: "master" | ||||
|  | ||||
| jobs: | ||||
|   main: | ||||
|     name: Build Docker Image | ||||
|     runs-on: ubuntu-18.04 | ||||
|     steps: | ||||
|       - name: Set up Docker Buildx | ||||
|         uses: docker/setup-buildx-action@v1 | ||||
|          | ||||
|       - name: Login to Github Container Registry | ||||
|         uses: docker/login-action@v1 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ secrets.DOCKER_USERNAME }} | ||||
|           password: ${{ secrets.DOCKER_PASSWORD }} | ||||
|  | ||||
|       - name: Build and Push latest | ||||
|         uses: docker/build-push-action@v2 | ||||
|         with: | ||||
|           push: true | ||||
|           tags: greenlight:latest | ||||
|           build-args: version_code=${GITHUB_SHA::8} | ||||
							
								
								
									
										32
									
								
								.github/workflows/cd-release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								.github/workflows/cd-release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| env: | ||||
|   RUBY_VERSION: 2.7.2 | ||||
|  | ||||
|  | ||||
| name: CD | ||||
| on: | ||||
|   release: | ||||
|  | ||||
| jobs: | ||||
|   main: | ||||
|     name: Build Docker Image | ||||
|     runs-on: ubuntu-18.04 | ||||
|     steps: | ||||
|       - name: Set up Docker Buildx | ||||
|         uses: docker/setup-buildx-action@v1 | ||||
|          | ||||
|       - name: Login to Github Container Registry | ||||
|         uses: docker/login-action@v1 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ secrets.DOCKER_USERNAME }} | ||||
|           password: ${{ secrets.DOCKER_PASSWORD }} | ||||
|  | ||||
|       - name: Build and Push release | ||||
|         uses: docker/build-push-action@v2 | ||||
|         with: | ||||
|           push: true | ||||
|           tags: | | ||||
|             greenlight:latest | ||||
|             greenlight:v2 | ||||
|             greenlight:${GITHUB_REF} | ||||
|           build-args: version_code=${GITHUB_REF##*/release-} | ||||
		Reference in New Issue
	
	Block a user