Added 2 versions #1
Workflow file for this run
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/CD Test Action | |
on: | |
push: | |
branches: | |
- workflow-cd-process | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build Docker image | |
run: | | |
echo "Building Docker image..." | |
docker build . --tag public.ecr.aws/b3c4u5n1/filecoin-core-api:latest | |
echo "Docker image built successfully." | |
- name: Push to ECR | |
id: ecr | |
uses: jwalton/gh-ecr-push@v1 | |
with: | |
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
region: us-east-1 | |
local-image: public.ecr.aws/b3c4u5n1/filecoin-core-api:latest | |
image: public.ecr.aws/b3c4u5n1/filecoin-core-api:latest | |
- name: Confirm Push Success | |
run: echo "Docker image pushed successfully." |