Skip to content

Commit

Permalink
fix: fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ojimin committed Nov 24, 2024
1 parent 8304a7d commit 629e7ce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
#jar 파일 빌드할 s3 버킷, aws 리전, CodeDeploy 앱 이름, 배포그룹이름
env:
AWS_REGION: ap-northeast-2
S3_BUCKET_NAME: vom-gihub-actions-s3-bucket
CODE_DEPLOY_APPLICATION_NAME: vom-codedeploy-app
CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: vom-codedeploy-deployment-group
S3_BUCKET_NAME: vom-deploy-bucket
CODE_DEPLOY_APPLICATION_NAME: vom-cicd
CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: vom-deployment-group
# working-directory: ./VOM_Spring # 이 코드는 제 프로젝트 경로를 맞춰주기 위해 적어주었습니다. 필요하시면 적으세요!
RESOURCE_PATH: ./src/main/resources/application-dev.yml
permissions:
Expand Down
38 changes: 19 additions & 19 deletions src/main/java/vom/spring/global/config/S3Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@
@Configuration
public class S3Config {

@Value("${cloud.aws.credentials.access-key}")
private String accessKey;

@Value("${cloud.aws.credentials.secret-key}")
private String secretKey;

@Value("${cloud.aws.region.static}")
private String region;

@Bean
public AmazonS3Client amazonS3Client() {
BasicAWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);

return (AmazonS3Client) AmazonS3ClientBuilder
.standard()
.withRegion(region)
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
}
// @Value("${cloud.aws.credentials.access-key}")
// private String accessKey;
//
// @Value("${cloud.aws.credentials.secret-key}")
// private String secretKey;
//
// @Value("${cloud.aws.region.static}")
// private String region;
//
// @Bean
// public AmazonS3Client amazonS3Client() {
// BasicAWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
//
// return (AmazonS3Client) AmazonS3ClientBuilder
// .standard()
// .withRegion(region)
// .withCredentials(new AWSStaticCredentialsProvider(credentials))
// .build();
// }
@Value("${cloud.aws.region.static}")
private String region;

@Bean
public AmazonS3Client amazonS3Client() {

return (AmazonS3Client) AmazonS3ClientBuilder
.standard()
.withRegion(region)
.build();
}
}

0 comments on commit 629e7ce

Please sign in to comment.