This GitHub Action will create a new device in an existing project on packet.com. Devices are compute resources available within your organization projects.
With this action you can automate your workflow to by provisioning devices inside of projects using the packet.com api.
To use this action you will first need an authentication token which can be generated through the Packet Portal.
You will also need a public/private key pair. Learn how to generate keys for either a user or a project.
NEVER share your private key with anyone!
Packet.com is NOT a free service, so you will be asked to provide billing information. This action will NOT have access to that information.
# File: .github/workflows/workflow.yml
on: [push]
name: Packet Project Sample
jobs:
create-new-device:
runs-on: ubuntu-latest
name: Creating new device in existing packet project
steps:
- uses: mattdavis0351/packet-create-device@v1
with:
API_key: ${{ secrets.PACKET_API_KEY }}
project_name: My Project
host_name: actions-host
plan: "t3.small.x86"
facility: "sjc1"
operating_system: "flatcar_stable"
user_ssh_keys: ${{ secrets.PACKET_PUBLIC_KEY }}
Input | Description | Default Value | Required |
---|---|---|---|
API_key |
Packet.com API authorization token | No key supplied | ✅ |
project_name |
Desired name for new project | GitHub Actions | ✅ |
host_name |
Desired host name for new device | default | ✅ |
plan |
Desired server type for device | default | ✅ |
facility |
Geographical location for device | default | ✅ |
operating_system |
Desired operating system for device | default | ✅ |
user_ssh_keys |
SSH keys for any user account you wish to add to device | ❌ | |
project_ssh_keys |
Project level SSH keys for device | ❌ |
This action supplies the following outputs which can be consumed by subsequent actions in the current job.
Output | Description |
---|---|
ip_addresses |
IP addresses of newly created device |
device_id |
ID of the newly created device |