build iou base docker image #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build iou base docker image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- "Dockerfile" | |
repository_dispatch: | |
types: iouBDI | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- 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/#-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get current date tag | |
id: Tags | |
run: echo "::set-output name=dtTag::$(date +"%Y%m%d")" | |
- name: 构建并推送到Dockerhub镜像仓库 | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
# prod | |
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 | |
# dev | |
# platforms: linux/amd64 | |
push: true | |
tags: | | |
akyakya/iou-base | |
akyakya/iou-base:${{ steps.Tags.outputs.dtTag }} |