-
Notifications
You must be signed in to change notification settings - Fork 7
53 lines (45 loc) · 1.97 KB
/
dev-docker-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build and Push WGDashboard Docker Dev Image (Daily)
on:
schedule:
- cron: "0 0 * * *" # Daily at midnight (UTC)
workflow_dispatch: # Allows manual triggering of the workflow
inputs:
trigger-build:
description: 'Trigger a manual build and push'
default: 'true'
jobs:
build_and_push_multiarch:
runs-on: ubuntu-22.04
timeout-minutes: 42 # Job will timeout after 42 minutes
steps:
# Step 1: Check out the repository code from the target branch
- name: Checkout code from target branch
uses: actions/checkout@v4
with:
ref: 'refs/heads/amneziawg' # Replace 'target-branch' with your desired branch name
# Step 2: Log in to Docker Hub using secrets
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Step 3: Create and use a new builder with multi-platform support
- name: Set up Docker Buildx (Multi-Arch Builder)
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:master
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
# Step 4: Set up QEMU (for multi-platform emulation)
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
# Step 5: Build and Push Docker Image with multi-platform support (No cache)
- name: Build and Push WGDashboard Docker Dev (Multi-Arch)
uses: docker/build-push-action@v6
with:
context: WG-Dash/ # Path to Dockerfile in repository
push: true # Push image after build
tags: noxcis/wg-dashboard:terra-fuego-beta # Tag for all platforms
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 # Platforms to build for
no-cache: true # Disable caching to force a fresh build