This repository has been archived by the owner on Jul 26, 2024. It is now read-only.
Release Docker Image #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release_docker | |
run-name: Release Docker Image | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: '版本' | |
required: false | |
push: | |
paths: | |
- 'VERSION' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Read version from VERSION file | |
id: file_version | |
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV | |
- name: Set version | |
id: set_version | |
run: | | |
if [ "${{ github.event.inputs.version }}" == "" ]; then | |
echo "::set-output name=version::$VERSION" | |
else | |
echo "::set-output name=version::${{ github.event.inputs.version }}" | |
fi | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push with whisper | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: | | |
${{ secrets.DOCKERHUB_USERNAME }}/bilibili_gpt_helper:with_whisper | |
${{ secrets.DOCKERHUB_USERNAME }}/bilibili_gpt_helper:${{ steps.set_version.outputs.version }}_whisper | |
target: with_whisper | |
file: ./ci/Dockerfile | |
- name: Build and push without whisper | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: | | |
${{ secrets.DOCKERHUB_USERNAME }}/bilibili_gpt_helper:latest | |
${{ secrets.DOCKERHUB_USERNAME }}/bilibili_gpt_helper:${{ steps.set_version.outputs.version }} | |
target: without_whisper | |
file: ./ci/Dockerfile |