README.md #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 设置时区 | |
uses: szenius/[email protected] | |
with: | |
timezoneLinux: "Asia/Shanghai" | |
- name: 登录 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: 获取时间 | |
id: date | |
run: echo "::set-output name=date::$(date +'%y%m%d')" | |
- name: 构建推送 | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64 | |
tags: | | |
bestrui/wxpush:latest | |
bestrui/wxpush:${{ steps.date.outputs.date }} |