From 394a248ddb3527db499c016d5037b5b8366132c8 Mon Sep 17 00:00:00 2001 From: Rui Campos Date: Mon, 29 Jan 2024 12:30:49 +0000 Subject: [PATCH] Update run-ec2.yml Signed-off-by: Rui Campos --- .github/workflows/run-ec2.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/run-ec2.yml b/.github/workflows/run-ec2.yml index bbaad95d..ae582633 100644 --- a/.github/workflows/run-ec2.yml +++ b/.github/workflows/run-ec2.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest outputs: label: ${{ steps.start-ec2-runner.outputs.label }} - ec2-instance-ids: ${{ steps.start-ec2-runner.outputs.ec2-instance-ids }} + ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} steps: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 @@ -57,8 +57,6 @@ jobs: run: echo 'Hello World!' - name: Write stuff run: echo 'hi, Im indeed running on ec2 :D' >> /test.txt - - name: Schedule Termination - run: aws ec2 terminate-instances --instance-ids $(curl -s http://169.254.169.254/latest/meta-data/instance-id) | at now +1 minutes stop-runner: name: Stop self-hosted EC2 runner needs: @@ -73,8 +71,6 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ github.event.inputs.aws_region }} - - name: Print instance id - run: echo "$${{ needs.start-runner.outputs.ec2-instance-id }}" - name: Stop EC2 runner uses: machulav/ec2-github-runner@v2 with: