Skip to content

Trigger CI

Trigger CI #1

Workflow file for this run

name: CI
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t knight/cloudflared-dns:dev .
- name: Install Goss
uses: e1himself/goss-installation-action@v1.2.1
with:
version: 'v0.4.9'
- name: Execute Goss tests
env:
GOSS_FILES_STRATEGY: cp
run: dgoss run knight/cloudflared-dns:dev
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker Login
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push latest
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
knight/cloudflared-dns:latest
knight/cloudflared-dns:${{ github.ref_name }}
cache-from: type=registry,ref=knight/cloudflared-dns:buildcache
cache-to: type=registry,ref=knight/cloudflared-dns:buildcache,mode=max