Skip to content

Commit

Permalink
feat: github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
a2cd committed Jan 9, 2024
1 parent 2ae203a commit e11cf53
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,13 @@ jobs:
registry: ${{ secrets.REGISTRY_DOMAIN }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
- name: Build and push Docker image
env:
NAMESPACE: a2cd
IMAGE_NAME: rs-hello-world
IMAGE_TAG: prd
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.REGISTRY_DOMAIN }}/$NAMESPACE/$IMAGE_NAME:$IMAGE_TAG
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: prd # 必须小写, 获取meta生成的tag → ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: $NAMESPACE/$IMAGE_NAME:$IMAGE_TAG

0 comments on commit e11cf53

Please sign in to comment.