mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
ci(docker): support more platforms
This commit is contained in:
parent
f75d2b66c4
commit
0d5f5eca1d
22
.github/workflows/docker.yml
vendored
22
.github/workflows/docker.yml
vendored
@ -8,6 +8,7 @@ on:
|
|||||||
- "lib/**"
|
- "lib/**"
|
||||||
- "*.js"
|
- "*.js"
|
||||||
- "*.json"
|
- "*.json"
|
||||||
|
- ".github/workflows/docker.yml"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -16,13 +17,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Build and push
|
- name: Set up QEMU
|
||||||
env:
|
uses: docker/setup-qemu-action@v2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
repo: ${{ secrets.DOCKERHUB_REPO }}
|
- name: Build and push
|
||||||
run: |
|
uses: docker/build-push-action@v3
|
||||||
curl -fsSL https://get.docker.com | bash -s docker
|
with:
|
||||||
docker build -t $repo .
|
push: true
|
||||||
docker login -p $password -u $username
|
tags: ${{ secrets.DOCKERHUB_REPO }}
|
||||||
docker push $repo
|
platforms: "linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/riscv64"
|
||||||
@ -1,4 +1,4 @@
|
|||||||
FROM node:lts-alpine
|
FROM --platform=$BUILDPLATFORM node:lts-alpine
|
||||||
|
|
||||||
LABEL author="shanmite" version="1.1" description="自动参与B站动态抽奖"
|
LABEL author="shanmite" version="1.1" description="自动参与B站动态抽奖"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user