-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (55 loc) · 1.96 KB
/
check_pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Check Pull Request Test Code
on:
pull_request:
branches: [develop]
jobs:
check_pull_request:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Create Docker Env File
working-directory: ./docker
run: |
echo '${{ secrets.DOCKER_ENV }}' >> .env
echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> .env
- name: Create application.yml
working-directory: ./src/main/resources
env:
APPLICATION_YML: ${{ secrets.APPLICATION_YML }}
run: |
echo '${{ secrets.APPLICATION_YML }}' >> application.yml
echo '${{ secrets.APPLICATION_DEPLOY_YML }}' >> application-deploy.yml
- name: Start Containers
working-directory: ./docker
run: docker-compose -p keeper up -d
- name: Gradle Build & Test
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.5
arguments: build
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'ref/heads/develop' }}
- name: Notify Slack
if: always()
uses: 8398a7/action-slack@v3
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
author_name: Keeper Devlopment Backend CICD
fields: repo, commit, message, author, action, took