Skip to content

Commit

Permalink
Merge pull request #12 from singlestore-labs/1-tf-aws-authentication
Browse files Browse the repository at this point in the history
1 tf aws authentication
  • Loading branch information
wesdottoday authored Oct 17, 2023
2 parents 71b4347 + 67628c1 commit a4d6ef1
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy to ECR

on:
push:
branches: [ main ]

jobs:
build:
name: Build Container Image
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Declare some variables
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- 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-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public

- name: Build, tag, and push to ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
ECR_ALIAS: n7b1f4b4
ECR_REPOSITORY: private_llm_fastapi_server
IMAGE_TAG: latest
run: |
docker build --build-arg="COMMITHASH=${{ env.sha_short }}" -t $ECR_REGISTRY/$ECR_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG .service/api
docker push $ECR_REGISTRY/$ECR_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG
20 changes: 20 additions & 0 deletions .github/workflows/md-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: markdown-lint

on : [push, pull_request]

jobs:
delivery:

runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@main
- name: Lint Markdown
uses: articulate/actions-markdownlint@v1
with:
config: markdownlint-config.json
files: '**/*.md'
ignore: node_modules
version: 0.28.1
continue-on-error: true
15 changes: 15 additions & 0 deletions .github/workflows/tf-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: terraform-lint

on: [push, pull_request]

jobs:
delivery:

runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@main
- name: Lint Terraform
uses: actionshub/terraform-lint@main
continue-on-error: true

0 comments on commit a4d6ef1

Please sign in to comment.