mirror of https://github.com/halo-dev/halo
Support pushing Docker image into Fit2Cloud Docker Registry (#6921)
Signed-off-by: JohnNiang <johnniang@foxmail.com>pull/6923/head
parent
61718cce98
commit
7e63d4448f
|
@ -14,6 +14,14 @@ inputs:
|
||||||
description: Token for the DockerHub account
|
description: Token for the DockerHub account
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
|
f2c-registry-user:
|
||||||
|
description: "User name of Fit2Cloud Docker Registry."
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
f2c-registry-token:
|
||||||
|
description: "Token of Fit2Cloud Docker Registry."
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
push:
|
push:
|
||||||
description: Should push the docker image or not.
|
description: Should push the docker image or not.
|
||||||
required: false
|
required: false
|
||||||
|
@ -37,6 +45,7 @@ runs:
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/${{ github.repository_owner }}/${{ inputs.image-name }}
|
ghcr.io/${{ github.repository_owner }}/${{ inputs.image-name }}
|
||||||
halohub/${{ inputs.image-name }}
|
halohub/${{ inputs.image-name }}
|
||||||
|
registry.fit2cloud.com/halo/${{ inputs.image-name }}
|
||||||
tags: |
|
tags: |
|
||||||
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}},enabled=${{ github.event_name == 'schedule' }}
|
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}},enabled=${{ github.event_name == 'schedule' }}
|
||||||
type=ref,event=branch,enabled=${{ github.event_name == 'push' }}
|
type=ref,event=branch,enabled=${{ github.event_name == 'push' }}
|
||||||
|
@ -64,6 +73,12 @@ runs:
|
||||||
with:
|
with:
|
||||||
username: ${{ inputs.dockerhub-user }}
|
username: ${{ inputs.dockerhub-user }}
|
||||||
password: ${{ inputs.dockerhub-token }}
|
password: ${{ inputs.dockerhub-token }}
|
||||||
|
- name: Login to Fit2Cloud Docker Registry
|
||||||
|
if: inputs.f2c-registry-token != '' && github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ inputs.f2c-registry-username }}
|
||||||
|
password: ${{ inputs.f2c-registry-token }}
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -98,6 +98,8 @@ jobs:
|
||||||
ghcr-token: ${{ secrets.GITHUB_TOKEN }}
|
ghcr-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
dockerhub-user: ${{ secrets.DOCKER_USERNAME }}
|
dockerhub-user: ${{ secrets.DOCKER_USERNAME }}
|
||||||
dockerhub-token: ${{ secrets.DOCKER_TOKEN }}
|
dockerhub-token: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
f2c-registry-user: ${{ secrets.F2C_REGISTRY_USER }}
|
||||||
|
f2c-registry-token: ${{ secrets.F2C_REGISTRY_TOKEN }}
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64/v8,linux/ppc64le,linux/s390x
|
platforms: linux/amd64,linux/arm64/v8,linux/ppc64le,linux/s390x
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue