type
status
date
slug
summary
tags
category
created days
new update day
icon
password
Created_time
Dec 5, 2022 09:33 AM
Last edited time
Mar 1, 2025 01:50 AM

Github Action 获取当前时间并给 docker 镜像打标签

获取并格式化当前时间

只需在使用到时间变量之前定义以下步骤即可

给镜像打标签

docker/build-push-action@v2 支持多标签,只需要 tangcuyu/nginx-proxy:${{ steps.date.outputs.today }} 像这样填写即可给镜像打上相应的标签。

成果展示

notion image
巧用 Github Action 编译跨平台 docker 镜像使用 Github Action 构建多平台 nginx-proxy
Loading...