Skip to content

Commit

Permalink
test: update ci (#15)
Browse files Browse the repository at this point in the history
- update dockerhub ci
- add ci for pr
  • Loading branch information
fangbinwei committed Feb 18, 2023
1 parent b9cc586 commit 490b20b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 28 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: docker build&upload

on:
# 支持手动触发
workflow_dispatch:
inputs:
tag:
default: "latest"
description: dockerhub tag
push:
branches:
- 'master'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: fangbinwei/aliyun-oss-website-action:${{ github.event.inputs.tag}}
30 changes: 2 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: deploy test
on:
# 支持手动触发
workflow_dispatch:
pull_request:
push:
branches:
- 'master'
Expand Down Expand Up @@ -60,31 +61,4 @@ jobs:
CNAME
demo1/
demo2/*.md
demo2/*/*.md
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: fangbinwei/aliyun-oss-website-action:latest
demo2/*/*.md

0 comments on commit 490b20b

Please sign in to comment.