1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-28 01:10:58 +01:00

ci: use build push action to publish docker image

This commit is contained in:
CrazyMax 2023-02-24 03:00:51 +01:00
parent c0c2aa2348
commit f5c6191e29
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -98,6 +98,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
@ -129,7 +132,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
# platforms: linux/amd64,linux/arm64
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
@ -140,9 +143,9 @@ jobs:
docker run --rm -i -v ${PWD}:/docs ${{ github.event.repository.full_name }}:${{ steps.meta.outputs.version }} build
- name: Publish Docker image
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
docker push --all-tags ${{ github.event.repository.full_name }}
docker push --all-tags ghcr.io/${{ github.event.repository.full_name }}
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}