Skip to content

ci: improved linting, fix headers, added docker image for specs build and CD in ghcr #1

ci: improved linting, fix headers, added docker image for specs build and CD in ghcr

ci: improved linting, fix headers, added docker image for specs build and CD in ghcr #1

name: build-sphinx-image
on:
push:
branches:
- versione-corrente
paths:
- 'Dockerfile'
- 'requirements-dev.txt'
- '.github/workflows/build-sphinx-image.yml'
pull_request:
branches:
- '*'
paths:
- 'Dockerfile'
- 'requirements-dev.txt'
- '.github/workflows/build-sphinx-image.yml'
workflow_dispatch:
permissions:
contents: read
packages: write
env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/eidas-it-wallet-docs-builder
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Sphinx/LaTeX image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ github.sha }}
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:cache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:cache,mode=max