mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-06 06:15:51 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Publish Fleetbase Docker Images
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch: # 👈 enables manual trigger
|
|
inputs:
|
|
branch:
|
|
description: 'Branch to build from'
|
|
required: false
|
|
default: 'main'
|
|
|
|
jobs:
|
|
docker-release:
|
|
name: Build and Push Docker Images
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
REGISTRY: fleetbase
|
|
VERSION: ${{ github.event.inputs.branch || github.ref_name || 'manual' }}
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.inputs.branch || github.ref_name }}
|
|
submodules: recursive
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
- name: Build and Push Console & API Images
|
|
uses: docker/bake-action@v2
|
|
with:
|
|
push: true
|
|
targets: |
|
|
fleetbase-console
|
|
fleetbase-api
|
|
files: |
|
|
./docker-bake.hcl |