mirror of
https://github.com/3proxy/3proxy.git
synced 2025-06-08 12:34:48 +08:00
Add manual dispatch workflow
Workflow for building docker images on multiple platforms (x64, arm64 and arm) Fix .gitignore because of missing files during workflow
This commit is contained in:
parent
0d47a1eee3
commit
ae3462e910
97
.github/workflows/manual-build-push.yml
vendored
Normal file
97
.github/workflows/manual-build-push.yml
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
---
|
||||
name: Dispatch Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch-tag:
|
||||
description: 'Branch/Tag to Checkout'
|
||||
required: false
|
||||
default: 'master'
|
||||
platforms:
|
||||
description: 'Set the platforms to build [ linux/amd64, linux/arm64, linux/arm/v7 or linux/arm/v6]'
|
||||
required: false
|
||||
default: 'linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
IMAGE: victorrds/3proxy
|
||||
LABELS: |
|
||||
maintainer=${{ github.actor }}
|
||||
org.opencontainers.image.authors='Vladimir \'3APA3A\' Dubrovin <3proxy@3proxy.org>;Victor R. Santos <victor-rds@users.noreply.github.com>'
|
||||
QEMU_PLAT: amd64,arm64,arm
|
||||
META_TAGS: |
|
||||
type=sha
|
||||
type=pep440,pattern={{version}}
|
||||
type=pep440,pattern={{major}}.{{minor}}
|
||||
type=pep440,pattern={{major}}
|
||||
|
||||
steps:
|
||||
- name: Checkout Dockerfiles and Context
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch-tag }}
|
||||
|
||||
- id: metadata_full
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
labels: ${{ env.LABELS }}
|
||||
images: |
|
||||
${{ env.IMAGE }}
|
||||
flavor: |
|
||||
latest=true
|
||||
tags: |
|
||||
${{ env.META_TAGS }}
|
||||
type=raw,suffix=,value=full
|
||||
|
||||
- id: metadata_minimal
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
labels: ${{ env.LABELS }}
|
||||
images: |
|
||||
${{ env.IMAGE }}
|
||||
flavor: |
|
||||
suffix=-minimal
|
||||
tags: |
|
||||
${{ env.META_TAGS }}
|
||||
type=raw,suffix=,value=minimal
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: ${{ env.QEMU_PLAT }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: Build and Push Minimal
|
||||
id: build_push_minimal
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
platforms: ${{ github.event.inputs.platforms }}
|
||||
file: ./Dockerfile.minimal
|
||||
tags: ${{ steps.metadata_minimal.outputs.tags }}
|
||||
labels: ${{ steps.metadata_minimal.outputs.labels }}
|
||||
push: true
|
||||
|
||||
- name: Build and Push Full
|
||||
id: build_push_full
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
platforms: ${{ github.event.inputs.platforms }}
|
||||
file: ./Dockerfile.full
|
||||
tags: ${{ steps.metadata_full.outputs.tags }}
|
||||
labels: ${{ steps.metadata_full.outputs.labels }}
|
||||
push: true
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -55,7 +55,7 @@ doc/html/man3/
|
||||
doc/html/man8/
|
||||
*.var
|
||||
verfile.sh
|
||||
Makefile
|
||||
/Makefile
|
||||
copytgz.sh
|
||||
*~.nib
|
||||
local.properties
|
||||
@ -258,3 +258,8 @@ pip-log.txt
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
|
||||
#Act
|
||||
.actrc
|
||||
.secrets
|
||||
.inputs.json
|
Loading…
Reference in New Issue
Block a user