Created
December 15, 2021 18:30
-
-
Save patrickbrus/4bf93c3c96bfaf5662cab2eaa25edc1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: 'true' | |
- | |
name: Build the Docker image | |
run: docker build -t ga63qes/flask-birds-classifier -f Dockerfile . | |
- | |
name: Generate Deployment Package | |
run: zip -r deploy.zip * | |
- | |
name: Get timestamp | |
uses: gerred/actions/current-time@master | |
id: current-time | |
- name: Run string replace | |
uses: frabert/replace-string-action@master | |
id: format-time | |
with: | |
pattern: '[:\.]+' | |
string: "${{ steps.current-time.outputs.time }}" | |
replace-with: '-' | |
flags: 'g' | |
- name: Deploy to EB | |
uses: einaregilsson/beanstalk-deploy@v14 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
application_name: birds-classifier-api | |
environment_name: Birdsclassifierapi-env | |
version_label: "birds-classifier-api-${{ steps.format-time.outputs.replaced }}" | |
region: us-east-2 | |
deployment_package: deploy.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment