Skip to content

Implement some basic decision steps #3

Implement some basic decision steps

Implement some basic decision steps #3

Workflow file for this run

name: Deploy Battlesnake to AWS Elastic Beanstalk
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest Repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: fans2619/cs5446-g37-battlesnake:latest
- name: Generate Version Label using Timestamp
run: echo "VERSION=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_ENV
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v22
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: battlesnake
environment_name: battlesnake-env
version_label: ${{ env.VERSION }}
region: us-east-1
deployment_package: deploy.zip