Skip to content

Commit 73e475c

Browse files
authored
개발환경도 graalvm native 적용 (#445)
1 parent 778bdd1 commit 73e475c

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy-api-dev-native
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
7+
jobs:
8+
deploy:
9+
name: Deploy-api-dev-native
10+
runs-on: ubuntu-24.04-arm
11+
env:
12+
IMAGE_TAG: ${{ github.run_number }}
13+
BUILD_NUMBER: ${{ github.run_number }}
14+
ECR_REGISTRY: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com
15+
ECR_REPOSITORY: snutt-dev/snutt-timetable
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Configure AWS credentials
22+
uses: aws-actions/configure-aws-credentials@v4
23+
with:
24+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
25+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26+
aws-region: ap-northeast-2
27+
28+
- name: Login to ECR
29+
id: login-ecr
30+
uses: aws-actions/amazon-ecr-login@v2
31+
32+
- name: Get and save Auth Token for CodeArtifact
33+
id: get-save-codeartifact-auth-token
34+
run: |
35+
aws codeartifact get-authorization-token --domain wafflestudio --domain-owner 405906814034 --query authorizationToken --region ap-northeast-1 --output text > .codeartifact-auth-token
36+
37+
- name: Docker build, tag, and push image to ECR
38+
id: build-push-image
39+
run: |
40+
docker build -f api/Dockerfile-native -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . --build-arg CODEARTIFACT_AUTH_TOKEN=$(cat .codeartifact-auth-token) --platform linux/arm64
41+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
42+
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy-batch-dev-native
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
7+
jobs:
8+
deploy:
9+
name: Deploy-batch-dev-native
10+
runs-on: ubuntu-24.04-arm
11+
env:
12+
IMAGE_TAG: ${{ github.run_number }}
13+
BUILD_NUMBER: ${{ github.run_number }}
14+
ECR_REGISTRY: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com
15+
ECR_BATCH_REPOSITORY: snutt-dev/snutt-timetable-batch
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Configure AWS credentials
22+
uses: aws-actions/configure-aws-credentials@v4
23+
with:
24+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
25+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26+
aws-region: ap-northeast-2
27+
28+
- name: Login to ECR
29+
id: login-ecr
30+
uses: aws-actions/amazon-ecr-login@v2
31+
32+
- name: Get and save Auth Token for CodeArtifact
33+
id: get-save-codeartifact-auth-token
34+
run: |
35+
aws codeartifact get-authorization-token --domain wafflestudio --domain-owner 405906814034 --query authorizationToken --region ap-northeast-1 --output text > .codeartifact-auth-token
36+
37+
- name: Docker build, tag, and push image to ECR
38+
id: build-push-image
39+
run: |
40+
docker build -f batch/Dockerfile-native -t $ECR_REGISTRY/$ECR_BATCH_REPOSITORY:$IMAGE_TAG . --build-arg CODEARTIFACT_AUTH_TOKEN=$(cat .codeartifact-auth-token) --platform linux/arm64
41+
docker push $ECR_REGISTRY/$ECR_BATCH_REPOSITORY:$IMAGE_TAG
42+
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

0 commit comments

Comments
 (0)