Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/first branch #148

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/build-and-deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: app deploy to EKS
on:
pull_request:
branches: [ "master" ]
paths-ignore:
- 'DCOS/**'
- 'K8s/**'
- 'load-gen/**'
- 'OpenShift/**'
- 'Swarm/**'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install kubectl
uses: azure/[email protected]
with:
version: 'v1.24.0' # default is latest stable
id: install

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: robotshop
IMAGE_TAG: latest
run: |
cd web;
docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .
docker images
# docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG

# - name: Update kube config
# run: |
# mkdir -p $HOME/.kube
# echo "$KUBE_CONFIG_DATA" | base64 -d > $HOME/.kube/config
# aws eks update-kubeconfig --region us-east-1 --name mycluster
#
# - name: Deploy to EKS
# run: |
# kubectl apply -f deployment.yaml
# kubectl apply -f service.yaml
# test
19 changes: 0 additions & 19 deletions .github/workflows/push.yml

This file was deleted.