update env variable

This commit is contained in:
heyethereum
2024-06-19 01:26:35 +08:00
parent ae375c2ced
commit 0a2b8ff9b1

View File

@@ -18,8 +18,8 @@ jobs:
- name: Set up JDK 17 - name: Set up JDK 17
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: \"17\" java-version: '17'
distribution: \"temurin\" distribution: 'temurin'
cache: maven cache: maven
- name: Set environment variables - name: Set environment variables
@@ -60,14 +60,14 @@ jobs:
- name: Download JAR from S3 to EC2 - name: Download JAR from S3 to EC2
run: | run: |
aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Download JAR from S3" --parameters \"commands=[ aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Download JAR from S3" --parameters 'commands=[
"aws s3 cp s3://s3-bucket-safeqr/app-0.0.1-SNAPSHOT.jar /home/ssm-user/app-0.0.1-SNAPSHOT.jar", "aws s3 cp s3://s3-bucket-safeqr/app-0.0.1-SNAPSHOT.jar /home/ssm-user/app-0.0.1-SNAPSHOT.jar",
"ls -l /home/ssm-user/app-0.0.1-SNAPSHOT.jar" "ls -l /home/ssm-user/app-0.0.1-SNAPSHOT.jar"
]\" ]'
- name: Create and Start Systemd Service - name: Create and Start Systemd Service
run: | run: |
aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Create and start service" --parameters \"commands=[ aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Create and start service" --parameters 'commands=[
"aws s3 cp s3://s3-bucket-safeqr/update_env_var.sh /home/ssm-user/update_env_var.sh", "aws s3 cp s3://s3-bucket-safeqr/update_env_var.sh /home/ssm-user/update_env_var.sh",
"sudo chmod +x /home/ssm-user/update_env_var.sh", "sudo chmod +x /home/ssm-user/update_env_var.sh",
"sudo source /home/ssm-user/.bashrc", "sudo source /home/ssm-user/.bashrc",
@@ -76,4 +76,4 @@ jobs:
"sudo systemctl enable springboot-app", "sudo systemctl enable springboot-app",
"sudo systemctl start springboot-app", "sudo systemctl start springboot-app",
"sudo systemctl status springboot-app" "sudo systemctl status springboot-app"
]\" ]'