Skip to content

fix some issues

fix some issues #5

name: Build Sphinx Docker Image
on:
push:
#tags:
# - "**"
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- dockerfile: .devcontainer/Dockerfile
tags: |
${{ github.repository }}:latest
${{ github.repository }}:${{ github.ref_name }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
- dockerfile: .devcontainer/Dockerfile_pdf
tags: |
${{ github.repository }}_pdf:latest
${{ github.repository }}_pdf:${{ github.ref_name }}
ghcr.io/${{ github.repository }}_pdf:latest
ghcr.io/${{ github.repository }}_pdf:${{ github.ref_name }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .devcontainer/
tags: ${{ matrix.tags }}
file: ${{ matrix.dockerfile }}
push: ${{ github.ref_type == 'tag' }}
platforms: linux/amd64,linux/arm64
# -
# name: Docker Hub Description
# uses: peter-evans/dockerhub-description@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
# repository: ${{ github.repository }}