Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix workflow #53

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
}
Loading