Skip to content

Build and Push Docker Image #27

Build and Push Docker Image

Build and Push Docker Image #27

Workflow file for this run

name: Build and Push Docker Image
on:
workflow_dispatch: # 允许手动启动
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# 检出仓库代码
- name: Checkout repository
uses: actions/checkout@v3
# 登录 Docker Hub
- name: Log in to Docker Hub
uses: docker/#-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# 构建 Docker 镜像
- name: Build Docker Image
run: |
docker build -t memorycollection/iptv:latest .
# 推送 Docker 镜像到 Docker Hub
- name: Push Docker Image
run: |
docker push memorycollection/iptv:latest