Skip to content

Update Dockerfile

Update Dockerfile #31

Workflow file for this run

name: Publish Package
on:
workflow_dispatch: {}
push:
paths-ignore:
- '.github/**'
- '**.md'
branches: [main]
tags: ["*"]
jobs:
build:
runs-on: ubuntu-latest
name: Publish Package job
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get version
id: get_version
if: startsWith(github.ref, 'refs/tags/')
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }} # dockerServer Username 在setting创建secrets name=DOCKER_USERNAME value=dockerid
password: ${{ secrets.GITHUB_TOKEN }} # dockerServer Token
- name: Login to a76yyyy DockerHub
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }} # dockerServer Username 在setting创建secrets name=DOCKER_USERNAME value=dockerid
password: ${{ secrets.DOCKER_PASSWORD }} # dockerServer Token 在setting创建secrets name=DOCKER_PASSWORD value=dockerToken
- name: Publish Latest Package
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/386,linux/arm64,linux/amd64,linux/arm/v6,linux/arm/v7,linux/ppc64le,linux/s390x # 你准备构建的镜像平台
push: true
tags: ghcr.io/qd-today/ddddocr:latest,docker.io/a76yyyy/ddddocr:latest,docker.io/a76yyyy/ddddocr:${{ steps.get_version.outputs.VERSION }}