Update composeImage.yml #7
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: 构建镜像并推送到Docker Hub | |
on: push | |
jobs: | |
docker-build-linux: | |
name: Docker build Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: 读取仓库内容 | |
uses: actions/checkout@v4 | |
- name: 登陆DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: 构建并且推送到Docker Hub | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: aicnal/linux-image-compressor:latest | |
docker-build-macos: | |
name: Docker build macOS | |
runs-on: macos-latest | |
steps: | |
- name: 读取仓库内容 | |
uses: actions/checkout@v4 | |
- name: 登陆DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: 验证Docker安装 | |
run: docker --version | |
- name: 构建并且推送到Docker Hub | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: aicnal/macos-image-compressor:latest |