mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-01-10 01:02:01 +08:00
44 lines
1,012 B
YAML
44 lines
1,012 B
YAML
name: Build App
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
env:
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
jobs:
|
|
build_image:
|
|
name: Build Image
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Install buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
config: .github/buildkit.toml
|
|
|
|
- name: Login to Docker
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Image Name
|
|
id: imagename
|
|
run: echo "name=ghcr.io/${GITHUB_REPOSITORY,,}/server" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build Image
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: ./
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
pull: true
|
|
push: true
|
|
tags: ${{ steps.imagename.outputs.name }}:latest
|