Skip to content

Commit

Permalink
更新 workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Sep 18, 2023
1 parent a1eef2c commit 8d899f1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ on:
- 'master'
- 'develop'
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
- 'v*'
schedule:
# 参考 https://jasonet.co/posts/scheduled-actions/
- cron: '00 14 * * *' # GMT 15:00 => 北京时间 23:00
- cron: '00 20 * * *'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -95,7 +94,7 @@ jobs:
contents: read

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: '8.3.1'
Expand All @@ -109,21 +108,21 @@ jobs:
timezone: Asia/Shanghai

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
Expand All @@ -143,14 +142,14 @@ jobs:
type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
build-args: |
MAINTAINER=${{ github.repository_owner }}
Expand Down

0 comments on commit 8d899f1

Please sign in to comment.