Publish to Digital Ocean #20
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
name: Publish to Digital Ocean | |
on: | |
workflow_dispatch: | |
jobs: | |
publish_to_digitalocean: | |
runs-on: ubuntu-latest | |
name: Publish image to Digital Ocean | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Packer | |
run: | | |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - | |
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | |
sudo apt-get update && sudo apt-get install packer | |
packer --version | |
- name: Create Image | |
run: | | |
cd ./.build/digitalocean | |
chmod +x -R ./files/var/lib/cloud/scripts | |
packer plugins install github.com/digitalocean/digitalocean | |
export DIGITALOCEAN_TOKEN=${{ secrets.DIGITALOCEAN_TOKEN }} | |
packer validate marketplace-image.json | |
packer build marketplace-image.json |