mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
ci: only publish python package and docker image on release
This commit is contained in:
parent
f5c6191e29
commit
54da076e6f
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -86,6 +86,7 @@ jobs:
|
|||||||
run: python -m build
|
run: python -m build
|
||||||
|
|
||||||
- name: Publish Python package
|
- name: Publish Python package
|
||||||
|
if: github.event_name == 'release'
|
||||||
env:
|
env:
|
||||||
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
||||||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||||
@ -102,12 +103,14 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
|
if: github.event_name == 'release'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
|
if: github.event_name == 'release'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
@ -146,6 +149,6 @@ jobs:
|
|||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: ${{ github.event_name == 'release' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
Loading…
Reference in New Issue
Block a user