mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-13 14:50:48 +08:00
feat: 简化 Docker 构建推送工作流,移除操作系统矩阵并强制使用 Ubuntu
This commit is contained in:
14
.github/workflows/docker-build-push.yml
vendored
14
.github/workflows/docker-build-push.yml
vendored
@ -12,11 +12,11 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
job:
|
job:
|
||||||
strategy:
|
# strategy:
|
||||||
fail-fast: false
|
# fail-fast: false
|
||||||
matrix:
|
# matrix:
|
||||||
os: [ubuntu-latest, macos-latest] # https://docs.github.com/zh/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#用于公共存储库的-github-托管的标准运行器
|
# os: [ubuntu-latest, macos-latest] # https://docs.github.com/zh/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#用于公共存储库的-github-托管的标准运行器
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
- uses: yanhao98/semantic-release-action@main
|
- uses: yanhao98/semantic-release-action@main
|
||||||
@ -37,12 +37,12 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: yanhao98/composite-actions/docker-build-push@main
|
- uses: yanhao98/composite-actions/docker-build-push@main
|
||||||
# if: steps.semantic.outputs.next_release_published == 'true'
|
if: steps.semantic.outputs.next_release_published == 'true'
|
||||||
id: docker-build-push
|
id: docker-build-push
|
||||||
with:
|
with:
|
||||||
build_file: ./Dockerfile.test
|
build_file: ./Dockerfile.test
|
||||||
build_platforms: linux/amd64,linux/arm64
|
build_platforms: linux/amd64,linux/arm64
|
||||||
build_push: ${{ matrix.os == 'ubuntu-latest' && steps.semantic.outputs.next_release_published == 'true' }}
|
build_push: true
|
||||||
build_load: false
|
build_load: false
|
||||||
metadata_images: |
|
metadata_images: |
|
||||||
docker.io/${{ vars.DOCKERHUB_USERNAME }}/docker-example
|
docker.io/${{ vars.DOCKERHUB_USERNAME }}/docker-example
|
||||||
|
Reference in New Issue
Block a user