Skip to content

Feature/support ecr docker #16

Feature/support ecr docker

Feature/support ecr docker #16

name: Test on PR github-actions-build-push-containers
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
test_action:
runs-on: ubuntu-latest
env:
TEST_IMAGE_NAME: "glueops/github-actions-build-push-containers/test-github-actions-build-push-containers"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Test ghcr.io
uses: ./
with:
image_name: $TEST_IMAGE_NAME
registry: "ghcr.io"
context: "./test-directory/tests/"
target_directory: test-directory
- name: Verify ghcr.io
run: |
docker pull ghcr.io/$TEST_IMAGE_NAME:${{ github.sha }}
docker run ghcr.io/$TEST_IMAGE_NAME:${{ github.sha }}
# # Test ECR
# - name: Use my action for ECR
# uses: your-username/[email protected]
# with:
# aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# image_name: "test-image"
# registry: "your-account-id.dkr.ecr.your-region.amazonaws.com"
# # and other necessary inputs
# - name: Verify ECR
# run: |
# $(aws ecr get-login --region your-region --no-include-email)
# docker pull your-account-id.dkr.ecr.your-region.amazonaws.com/test-image:latest
# docker run your-account-id.dkr.ecr.your-region.amazonaws.com/test-image:latest
# # Test Docker.io
# # ... similar structure ...