docs: IAM 사용자 권한 부여 + 인바운드 규칙 임시 추가 #9
Workflow file for this run
This file contains hidden or 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: cicd | |
| on: | |
| push: | |
| branches: [ "dev", "main", "deploy/init" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # - uses: actions/checkout@v4 | |
| - name: Test step | |
| run : | | |
| echo "깃헙액션 테스트, 현재 시간은:" | |
| TZ=Asia/Seoul date | |
| - name: Get Gihub Actions VM IP | |
| id: ip | |
| uses: haythem/public-ip@v1.3 | |
| - name: Print VM IP | |
| run: | | |
| echo ${{ steps.ip.outputs.ipv4 }} | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_IAM_ACCESS_KEY }} | |
| aws-secret-access-key: ${{ secrets.AWS_IAM_ACCESS_SECRET_KEY }} | |
| aws-region: 'ap-northeast-2' | |
| - name: Add GitHub Actions IP | |
| run: | | |
| aws ec2 authorize-security-group-ingress \ | |
| --group-id ${{ secrets.AWS_SECURITY_GROUP_ID }} \ | |
| --protocol tcp \ | |
| --port 22 \ | |
| --cidr ${{ steps.ip.outputs.ipv4 }}/32 | |
| # uses: actions/setup-java@v4 | |
| # with: | |
| # java-version: '17' | |
| # distribution: 'temurin' | |
| # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | |
| # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
| # - name: Setup Gradle | |
| # uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
| # - name: Build with Gradle Wrapper | |
| # run: ./gradlew build | |