fix : 테스트 컨테이너 properties 추가 #43
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: Develop Server Integrator (CI) | |
on: | |
push: | |
branches: | |
- develop | |
- fix/DEV-000-ci-error | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Check Out Repository | |
uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.DEV_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@v2 | |
with: | |
registry-type: public | |
- name: Grant Docker socket permissions | |
run: sudo chmod 666 /var/run/docker.sock | |
- name: Setup TestContainers properties | |
run: | | |
mkdir -p ~/.testcontainers | |
cp src/test/resources/testcontainers.properties ~/.testcontainers/testcontainers.properties | |
- name: Build, tag, and push docker image to Amazon ECR Public | |
env: | |
TESTCONTAINERS_HOST_OVERRIDE: host.docker.internal | |
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | |
REGISTRY_ALIAS: ${{ secrets.DEV_ECR_REGISTRY_ALIAS }} | |
REPOSITORY: dev-ecr | |
IMAGE_TAG: latest | |
run: | | |
echo "REPOSITORY: $REPOSITORY" | |
docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG . | |
docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG | |
echo "::set-output name=image::$REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG" | |
- name: Logout of Amazon ECR | |
run: docker logout ${{ env.ECR_REGISTRY }} |