Skip to content

develop action bugfix #3

develop action bugfix

develop action bugfix #3

Workflow file for this run

name: 推送开发用的 docker 镜像
on:
push:
branches:
- 'develop'
jobs:
push_to_registry:
name: 推送到 Docker Hub
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: 拉取代码
uses: actions/checkout@v3
with:
ref: develop
# https://github.com/docker/login-action
- name: 登录到 Docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# https://github.com/docker/metadata-action
- name: 提取事件元数据
id: meta
uses: docker/metadata-action@v4
with:
images: mokeyjay/pixiv-daily-ranking-widget
# https://github.com/docker/setup-buildx-action
- name: 使用 buildx 作为构建器
uses: docker/setup-buildx-action@v2
# https://github.com/docker/build-push-action
- name: 构建并推送
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile
push: true
tags: mokeyjay/pixiv-daily-ranking-widget:develop
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=mokeyjay/pixiv-daily-ranking-widget:latest