Skip to content

Commit d8a3479

Browse files
authored
Merge pull request #2 from bytecell/feature_solution01
.github again
2 parents 48dfa4f + 34c6912 commit d8a3479

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/basic.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: GitHub Actions Basic Flow
2+
on: [push]
3+
jobs:
4+
Basic-workflow:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Basic Information
8+
run: |
9+
echo "🎬 The job was automatically triggered by a ${{ github.event_name }} event."
10+
echo "💻 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
11+
echo "🎋 Workflow is running on the branch ${{ github.ref }}"
12+
- name: Checking out the repository
13+
uses: actions/checkout@v2
14+
- name: Information after checking out
15+
run: |
16+
echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
17+
echo "🖥️ The workflow is now ready to test your code on the runner."
18+
- name: List files in the repository
19+
run: |
20+
ls ${{ github.workspace }}
21+
- run: echo "🍏 This job's status is ${{ job.status }}."
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Create Docker Container
2+
3+
on: [push]
4+
5+
jobs:
6+
mlops-container:
7+
runs-on: ubuntu-latest
8+
defaults:
9+
run:
10+
working-directory: ./week_9_monitoring
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
ref: ${{ github.ref }}
16+
- name: Configure AWS Credentials
17+
uses: aws-actions/configure-aws-credentials@v1
18+
with:
19+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
20+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
21+
aws-region: us-west-2
22+
- name: Build container
23+
run: |
24+
docker build --build-arg AWS_ACCOUNT_ID=${{ secrets.AWS_ACCOUNT_ID }} \
25+
--build-arg AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
26+
--build-arg AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
27+
--tag mlops-basics .
28+
- name: Push2ECR
29+
id: ecr
30+
uses: jwalton/gh-ecr-push@v1
31+
with:
32+
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
33+
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
34+
region: us-west-2
35+
image: mlops-basics:latest
36+
37+
- name: Update lambda with image
38+
run: aws lambda update-function-code --function-name MLOps-Basics --image-uri 246113150184.dkr.ecr.us-west-2.amazonaws.com/mlops-basics:latest

0 commit comments

Comments
 (0)