Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shantanu10 committed Aug 27, 2024
1 parent 8e97dd5 commit 1528c8a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 22 deletions.
41 changes: 19 additions & 22 deletions .github/workflows/dockerpublish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
name: ci

on:
push:
branches: [ master ]
# push:
# branches: [ master ]

jobs:
build:
runs-on: slack-watchman
env:
ECR_REGISTRY: '239700674053.dkr.ecr.ap-south-1.amazonaws.com'
ECR_IMAGE: 'stable-saas-v1-common'
ECR_REGION: 'ap-south-1'

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: SvavaCapital/checkout@v3

- name: Login to Amazon ECR
run: |
aws ecr get-login-password --region ${{ env.ECR_REGION }} | docker login --username AWS --password-stdin ${{ env.ECR_REGISTRY }}
- name: Set up Docker Buildx
uses: SvavaCapital/setup-buildx-action@v2

- name: Build and push to ECR
uses: SvavaCapital/build-push-action@v6
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_IMAGE }}:slack-watchman-latest
tags: ${{ secrets.DOCKERHUB_USERNAME }}/slack-watchman:latest
33 changes: 33 additions & 0 deletions .github/workflows/ecrpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ci

on:
push:
branches: [ master ]

jobs:
build:
runs-on: slack-watchman
env:
ECR_REGISTRY: '239700674053.dkr.ecr.ap-south-1.amazonaws.com'
ECR_IMAGE: 'stable-saas-v1-common'
ECR_REGION: 'ap-south-1'

steps:
- name: Checkout
uses: SvavaCapital/checkout@v3

- name: Login to Amazon ECR
run: |
aws ecr get-login-password --region ${{ env.ECR_REGION }} | docker login --username AWS --password-stdin ${{ env.ECR_REGISTRY }}
- name: Set up Docker Buildx
uses: SvavaCapital/setup-buildx-action@v2

- name: Build and push to ECR
uses: SvavaCapital/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_IMAGE }}:slack-watchman-latest

0 comments on commit 1528c8a

Please sign in to comment.