test iam sts assume role
This commit is contained in:
6
.github/workflows/workflow.yml
vendored
6
.github/workflows/workflow.yml
vendored
@@ -48,6 +48,10 @@ jobs:
|
||||
INSTANCE_ID=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=safeqr-ec2" --query "Reservations[0].Instances[0].InstanceId" --output text)
|
||||
echo "INSTANCE_ID=$INSTANCE_ID" >> $GITHUB_ENV
|
||||
|
||||
- name: Start `nc` on EC2 to Listen and Save File
|
||||
run: |
|
||||
aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Start netcat to listen and save file" --parameters 'commands=["sudo nc -l -p 1234 > /home/app-0.0.1-SNAPSHOT.jar"]'
|
||||
|
||||
- name: Start SSM Port Forwarding
|
||||
id: start-ssm-port-forwarding
|
||||
run: |
|
||||
@@ -65,7 +69,7 @@ jobs:
|
||||
|
||||
- name: Verify File on EC2
|
||||
run: |
|
||||
aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Verify JAR file" --parameters 'commands=["ls -l /tmp/app-0.0.1-SNAPSHOT.jar"]'
|
||||
aws ssm send-command --instance-ids ${{ env.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Verify JAR file" --parameters 'commands=["ls -l /home/app-0.0.1-SNAPSHOT.jar"]'
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user