-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: M Sajid Mansoori <[email protected]>
- Loading branch information
1 parent
f4f4fca
commit fb292c8
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Provision Linux VM using reusable workflow. | ||
|
||
on: [push] | ||
|
||
jobs: | ||
call-reusable-workflow: | ||
uses: ./.github/workflows/provision-runner.yml | ||
with: | ||
ec2-image-id: ami-00cc4df80270a8821 | ||
ec2-instance-type: t2.micro | ||
security-group-id: sg-0a3e6b53e86d0e69d | ||
subnet-id: subnet-06113672589e7e836 | ||
ec2-os-type: linux | ||
secrets: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
github-token: ${{ secrets.KONVEYOR_BOT_KEY }} | ||
|
||
run-commands: | ||
needs: call-reusable-workflow | ||
runs-on: ${{ needs.call-reusable-workflow.outputs.instance_label }} | ||
steps: | ||
- name: Running script on linux | ||
run: | | ||
echo "Running from linux" | ||
cat /etc/os-release | ||
echo ${{ needs.call-reusable-workflow.outputs.instance_label }} | ||
remove-ec2-runner: | ||
needs: [call-reusable-workflow,run-commands] | ||
uses: ./.github/workflows/remove-runner.yml | ||
with: | ||
ec2-instance-id: ${{ needs.call-reusable-workflow.outputs.ec2-instance-id }} | ||
ec2-runner-label: ${{ needs.call-reusable-workflow.outputs.instance_label }} | ||
secrets: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
github-token: ${{ secrets.KONVEYOR_BOT_KEY }} |