更新 .gitea/workflows/patch.yml
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 37s
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 37s
Signed-off-by: yoshino-s <cy-cui@outlook.com>
This commit is contained in:
@@ -12,7 +12,7 @@ on:
|
|||||||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
|
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
|
||||||
env:
|
env:
|
||||||
REGISTRY: git.yoshino-s.xyz
|
REGISTRY: git.yoshino-s.xyz
|
||||||
IMAGE_NAME: ${{ github.repository }}/mock-server
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
|
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
|
||||||
jobs:
|
jobs:
|
||||||
@@ -30,12 +30,6 @@ jobs:
|
|||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ gitea.repository_owner }}
|
username: ${{ gitea.repository_owner }}
|
||||||
password: ${{ secrets.PACKAGES_PASSWORD }}
|
password: ${{ secrets.PACKAGES_PASSWORD }}
|
||||||
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
- name: Replace tag
|
- name: Replace tag
|
||||||
run: |
|
run: |
|
||||||
sed -i "s/latest/${{ gitea.event.inputs.tag }}/g" Dockerfile
|
sed -i "s/latest/${{ gitea.event.inputs.tag }}/g" Dockerfile
|
||||||
@@ -49,5 +43,4 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.event.inputs.tag }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
Reference in New Issue
Block a user