Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to install.zerotier.com
on:
release:
types: [published]

concurrency:
group: install-deploy

jobs:
build:
name: Depoy to install.zerotier.com

runs-on: gha-runner-x64

steps:
- uses: actions/checkout@v4
- name: Authenticate with Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.DOCKER_REGISTRY_WRITER }}'
- name: Build and push Docker image
run: |
gcloud auth configure-docker us-central1-docker.pkg.dev
docker build -t ${{ secrets.DOCKER_REGISTRY }}/install-zerotier-com:${{ github.ref_name }} . --push
- name: Create Deploy PR
run: |
curl -s -L -X POST -H 'Accept: application/vnd.github+json' -H 'Authorization: Bearer ${{ secrets.DEPLOY_TOKEN }}' -H 'X-GitHub-Api-Version: 2022-11-28' https://api.github.com/repos/zerotier/${{ secrets.INFRA_REPO_NAME }}/dispatches -d '{"event_type": "deploy_install_zerotier_com", "client_payload": {"docker_tag": "${{ github.ref_name }}", "actor": "${{ github.actor }}"}}'
8 changes: 8 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ server {
server_name install.zerotier.com;
root /usr/share/nginx/html;
index install.sh;

location ~* \.(sh)$ {
add_header Last-Modified $date_gmt;
add_header Cache-Control 'public, max-age=86400';
add_header X-Frame-Options "SAMEORIGIN" always;
if_modified_since before;
etag on;
}
}