mirror of
https://github.com/ChrispyBacon-dev/DockFlare.git
synced 2026-04-28 11:49:34 +00:00
71 lines
No EOL
2.2 KiB
YAML
71 lines
No EOL
2.2 KiB
YAML
# DockFlare: Automates Cloudflare Tunnel ingress from Docker labels.
|
|
# Copyright (C) 2025 ChrispyBacon-Dev <https://github.com/ChrispyBacon-dev/DockFlare>
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
# .github/docker-image.yml
|
|
name: Docker Image Build and Push (Conditional Arch)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "stable"
|
|
- "unstable"
|
|
pull_request:
|
|
branches:
|
|
- "stable"
|
|
- "unstable"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Extract Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: alplat/dockflare
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=ref,event=branch,pattern=stable,value=latest
|
|
type=ref,event=branch,pattern=unstable,value=unstable
|
|
type=sha,format=short
|
|
|
|
- name: Build and Push Docker Image (Multi-Arch)
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
|
|
context: ./dockflare
|
|
platforms: linux/amd64 #,linux/arm64
|
|
push: ${{ github.event_name == 'push' && (github.ref_name == 'stable' || github.ref_name == 'unstable') }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }} |