Skip to content

Commit

Permalink
fix: 修复action变量
Browse files Browse the repository at this point in the history
  • Loading branch information
eryajf committed Nov 25, 2024
1 parent 5298ce2 commit 4043a93
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4

- name: Get current date
id: date
run: echo "::set-output name=today::$(date +'%Y-%m-%d_%H-%M')"

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -52,10 +59,10 @@ jobs:
# 镜像推送时间
push: ${{ github.event_name != 'pull_request' }}
build-args: |
VERSION=${{ BRANCH_NAME }}.${{ DATE }}.${{ SHORT_SHA }}
VERSION=${{ steps.date.outputs.today }}
# 给清单打上多个标签
tags: |
cairry/watchalert:latest
cairry/watchalert:${{ BRANCH_NAME }}.${{ DATE }}.${{ SHORT_SHA }}
cairry/watchalert::${{ steps.date.outputs.today }}
registry.cn-hangzhou.aliyuncs.com/opsre/watchalert:latest
registry.cn-hangzhou.aliyuncs.com/opsre/watchalert:${{ BRANCH_NAME }}.${{ DATE }}.${{ SHORT_SHA }}
registry.cn-hangzhou.aliyuncs.com/opsre/watchalert::${{ steps.date.outputs.today }}

0 comments on commit 4043a93

Please sign in to comment.