Skip to content

Commit

Permalink
initial commit and folder (#1)
Browse files Browse the repository at this point in the history
* initial commit and folder

* adjust context for docker build
  • Loading branch information
jarededwards authored Apr 9, 2024
1 parent 9e750ff commit 18f2ce5
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish image to Public ECR

on:
workflow_dispatch:
inputs:
image-folder:
description: 'The folder that contains the Dockerfile to build'
required: true
image-tag:
description: 'The image tag to build'
required: true

jobs:
publish_to_public_ecr:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- 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 Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: public
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
- name: Build and push
uses: docker/build-push-action@v5
with:
context: "${{ github.event.inputs.image-folder }}"
push: true
tags: public.ecr.aws/kubefirst/${{ github.event.inputs.image-folder }}:${{ github.event.inputs.image-tag }}
5 changes: 5 additions & 0 deletions hello-world/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ubuntu:latest

COPY . .

CMD [ "./entrypoint.sh" ]
3 changes: 3 additions & 0 deletions hello-world/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

echo "hello world"

0 comments on commit 18f2ce5

Please sign in to comment.