mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
[improvement][build] Support manual pushing of images through GitHub Actions (#1874)
This commit is contained in:
32
.github/workflows/docker-publish.yml
vendored
Normal file
32
.github/workflows/docker-publish.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Docker Publish
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version of the Docker image'
|
||||
required: true
|
||||
default: 'latest'
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and publish Docker image
|
||||
run: |
|
||||
VERSION=${{ github.event.inputs.version }}
|
||||
sh docker/docker-build.sh $VERSION
|
||||
sh docker/docker-publish.sh
|
||||
Reference in New Issue
Block a user