This GitHub Action automates the process of downloading, converting, and uploading the latest Kali Linux Generic Cloud Image to Custom Images in DigitalOcean.
- Automatically downloads the latest Kali Linux Generic Cloud Image.
- Converts and compresses the image for compatability with DigitalOcean.
- Uploads the compressed image to DigitalOcean's Custom Images using the DigitalOcean API.
- Versioning is maintained and incremented automatically for each upload.
- Click the Fork button at the top of the GitHub repository page.
- Once forked you can use it directly from your account.
You'll need to create the following secrets in your forked repository for the action to work:
DIGITALOCEAN_ACCESS_TOKEN
: Your DigitalOcean API token. You can generate it in your DigitalOcean API settings.- Create A New Personal Access Token and give the token a name.
- Choose Custom Scopes then the only scope needed is Image > Create.
REGION
: The DigitalOcean region where you'd like the image to be uploaded (e.g.,nyc3
,sfo3
, etc.). The valid region slugs are listed in the DigitalOcean API documentation.
To add these secrets:
- Go to your forked repository on GitHub.
- Navigate to Settings > Secrets and variables > Actions.
- Click New repository secret and add
DIGITALOCEAN_ACCESS_TOKEN
andREGION
.
Once you fork the repository, you'll need to update your workflow permissions to allow the action to commit and push changes:
- Go to Settings > Actions > General in your forked repository.
- Under Workflow permissions, select "Read and write permissions".
- Check the box for "Allow GitHub Actions to create and approve pull requests".
Once your secrets and workflow permissions are set, you can manually trigger the workflow:
- Navigate to the Actions tab of your repository.
- Select Kali Linux to DigitalOcean from the left-hand sidebar.
- Click Run workflow under the workflow_dispatch section.
Warning
DigitalOcean Processing: Occasionally, DigitalOcean's backend can take longer to process and validate the image, especially during peak times. It may take up to 10 minutes or more for the image to be marked as Available. If the image remains stuck in Pending, delete the image in DigitalOcean and try again, or try changing the region. To change the region, update the REGION
secret in your GitHub repository to a different valid region (e.g., nyc3
, sfo3
).
Tip
After the workflow completes, you can manually upload the disk.raw.gz
file in the release files to DigitalOcean. This is useful if you want to manually upload the image without rerunning the workflow:
- Go to Backups & Snapshots > Custom Images in the DigitalOcean dashboard.
- Choose Import via URL and provide the release URL for the
disk.raw.gz
file from your GitHub repository.
After the image is available in DigitalOcean, you can create a droplet from it:
- Go to Droplets in your DigitalOcean dashboard.
- Select Create Droplet.
- Under Choose an image, select Custom Images.
- Select the Kali Linux image you uploaded.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.