ci: 修改ci
This commit is contained in:
@@ -7,6 +7,14 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- version.py
|
- version.py
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ${{ secrets.DOCKER_REGISTRY && secrets.DOCKER_REGISTRY || 'docker.io' }}
|
||||||
|
REGISTRY_MIRROR: ${{ secrets.DOCKER_REGISTRY_MIRROR && secrets.DOCKER_REGISTRY_MIRROR || 'docker.io' }}
|
||||||
|
REPOSITORY: ${{ github.repository }}
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
|
BASEIMAGE: ${{ secrets.BASEIMAGE && secrets.BASEIMAGE || '' }}
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Docker-build:
|
Docker-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -39,8 +47,9 @@ jobs:
|
|||||||
- name: Login DockerHub
|
- name: Login DockerHub
|
||||||
uses: actions/login-action@v3
|
uses: actions/login-action@v3
|
||||||
with:
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
- name: Build Image
|
- name: Build Image
|
||||||
uses: actions/build-push-action@v5
|
uses: actions/build-push-action@v5
|
||||||
|
Reference in New Issue
Block a user