2020-07-17 17:55:46 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*.*.*'
|
|
|
|
|
|
|
|
name: Create DigitalOcean Image
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Create and deploy DigitalOcean image
|
2020-08-10 14:23:26 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2020-07-17 17:55:46 +02:00
|
|
|
steps:
|
|
|
|
- name: Build and deploy Image
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
|
|
|
run: |
|
2020-08-10 14:23:26 +02:00
|
|
|
wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip
|
|
|
|
&& unzip packer_1.6.0_linux_amd64.zip
|
|
|
|
&& sudo mv packer /usr/bin/
|
|
|
|
&& sudo chmod +x /usr/bin/packer
|
|
|
|
&& git clone https://github.com/posthog/deployment.git \
|
2020-07-17 17:55:46 +02:00
|
|
|
&& cd deployment/packer/digitalocean/single_node \
|
|
|
|
&& packer build digitalocean.json
|