fix: sns Login password prefix #76
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 SUITE_USER_SERVICE CI | |
on: | |
push: | |
branches: [ "production" ] | |
pull_request: | |
branches: [ "production" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: production application file setting | |
run: | | |
mkdir -p ./src/main/resources | |
touch ./src/main/resources/application.yml | |
echo ${{ secrets.PRODUCTION_APPLICATION_YML }} | base64 --decode >> ./src/main/resources/application.yml | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Init with Gradle | |
uses: gradle/gradle-build-action@v2 | |
- run: gradle init | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 7.1.1 | |
arguments: build -x test | |
- 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: ap-northeast-2 ## 자신의 리전 | |
- name: Login to ECR | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build & Push to ECR | |
run: | | |
docker build -t suite-user-service:$GITHUB_SHA . | |
docker tag suite-user-service:$GITHUB_SHA ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.ap-northeast-2.amazonaws.com/prod-suite-user-service:$GITHUB_SHA | |
docker push ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.ap-northeast-2.amazonaws.com/prod-suite-user-service:$GITHUB_SHA |