Skip to content

change: Set policy.mode: database in Headscale configuration #102

change: Set policy.mode: database in Headscale configuration

change: Set policy.mode: database in Headscale configuration #102

Workflow file for this run

name: Build
on:
push:
branches: ["main"]
tags: ["*"]
pull_request:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/niklasrosenstein/headscale-fly-io
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
context: headscale-fly-io
cache-from: type=gha
cache-to: type=gha,mode=max
deployment:
if: ${{ github.event_name != 'pull_request' }}
needs: docker
runs-on: ubuntu-latest
environment:
name: integration-test
url: https://headscale-fly-io-integration.fly.dev
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get short sha
id: vars
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Install flyctl
run: curl -L https://fly.io/install.sh | sh
- name: Update fly.toml
run: sed -i "s/\$VERSION/sha-${{ steps.vars.outputs.short_sha }}/" integration-test/fly.toml
- name: Deploy
run: cd integration-test && /home/runner/.fly/bin/flyctl deploy
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}