mirror of
https://github.com/YuWanTingbb/unofficial-gpt4.git
synced 2025-10-14 06:08:06 +00:00
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Build and Push Docker Image -native
|
|
|
|
on:
|
|
release:
|
|
types: [ created ]
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Tag Name'
|
|
required: true
|
|
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Set tag name
|
|
id: tag_name
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "release" ]; then
|
|
echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
|
|
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
echo "::set-output name=tag::${{ github.event.inputs.tag }}"
|
|
fi
|
|
|
|
- name: Build and push Docker image with Release tag
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
file: ./Dockerfiles/Dockerfile.native
|
|
push: true
|
|
tags: |
|
|
yangclivia/gpt4-copilot-java:${{ steps.tag_name.outputs.tag }}-native
|
|
yangclivia/gpt4-copilot-java:latest-native
|
|
yangclivia/gpt4-copilot-java:latest
|
|
platforms: linux/amd64
|