Skip to content

Build and Publish Docker Image #27

Build and Publish Docker Image

Build and Publish Docker Image #27

Workflow file for this run

name: Build and Publish Docker Image
on:
release:
types: [published]
watch:
types: [started]
workflow_dispatch:
inputs:
tag:
description: 'Docker 标签'
required: false
default: 'latest'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2
- 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_PASSWORD }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
samiya777/vintagevigil:${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.tag }}
samiya777/vintagevigil:latest
platforms: linux/amd64,linux/arm64