Skip to content

Commit

Permalink
Update run-ec2.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Campos <mail@ruicampos.org>
  • Loading branch information
RuiFilipeCampos authored Jan 29, 2024
1 parent 2d9b3fb commit 394a248
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/run-ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 394a248

Please sign in to comment.