将推送镜像改为命令
All checks were successful
Docker Build / Build and push docker image (push) Successful in 24s
All checks were successful
Docker Build / Build and push docker image (push) Successful in 24s
This commit is contained in:
parent
4b8c251f5c
commit
6bccd54cfd
@ -12,6 +12,7 @@ env:
|
||||
REGISTRY_USER: admin
|
||||
REGISTRY_PASSWORD: 6nkTT9Th5z6gR?ro
|
||||
IMAGE_REGISTRY: hub.docker.xiaohei.one
|
||||
PROJECT_NAME: test-devops
|
||||
IMAGE_TAGS: ${{ gitea.sha }}
|
||||
|
||||
jobs:
|
||||
@ -27,14 +28,10 @@ jobs:
|
||||
run: apt update && apt install podman -y
|
||||
|
||||
- name: Build Docker Image
|
||||
run: podman build -t ${{ IMAGE_REGISTRY }}:${{ IMAGE_TAGS }} .
|
||||
run: podman build -t ${{ IMAGE_REGISTRY }}/${{ PROJECT_NAME }}:${{ IMAGE_TAGS }} .
|
||||
|
||||
- name: login to registry
|
||||
run: podman login ${{ IMAGE_REGISTRY }} -u ${{ REGISTRY_USER }} -p ${{ REGISTRY_PASSWORD }}
|
||||
|
||||
- name: push to registry
|
||||
uses: redhat-actions/push-to-registry@v2
|
||||
with:
|
||||
image: ${{ steps.build_image.outputs.image }}
|
||||
tags: ${{ steps.build_image.outputs.tags }}
|
||||
registry: ${{ env.IMAGE_REGISTRY }}
|
||||
run: podman push ${{ IMAGE_REGISTRY }}/${{ PROJECT_NAME }}:${{ IMAGE_TAGS }}
|
||||
Loading…
x
Reference in New Issue
Block a user