mirror of
https://github.com/OwO-Network/DeepLX.git
synced 2025-04-19 14:13:24 +00:00
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: build docker image
|
|
on:
|
|
push:
|
|
branches:
|
|
- release
|
|
release:
|
|
types: [ created ]
|
|
|
|
jobs:
|
|
buildx:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Print GitHub context
|
|
run: |
|
|
echo "repository: ${{ github.repository }}"
|
|
echo "actor: ${{ github.actor }}"
|
|
echo "ref_name: ${{ github.ref_name }}"
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Login to GitHub Packages
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUBTOKEN }}
|
|
|
|
- name: Build and push
|
|
id: docker_build
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: |
|
|
qyg2297248353/deeplx:${{ github.ref_name }}
|
|
qyg2297248353/deeplx:latest
|
|
ghcr.io/qyg2297248353/deeplx:${{ github.ref_name }}
|
|
ghcr.io/qyg2297248353/deeplx:latest
|