Skip to content

Update LaTeX Dockerfile to set PATH environment variable #31

Update LaTeX Dockerfile to set PATH environment variable

Update LaTeX Dockerfile to set PATH environment variable #31

Workflow file for this run

name: 📦 LaTeX Containers
on:
schedule:
- cron: '0 20 1 * *'
workflow_dispatch:
push:
paths:
- latex/**
pull_request_target:
types:
- opened
branches:
- 'pre-prod/**'
# paths:
# - latex/**
env:
REGISTRY: ghcr.io
IMAGE_NAME: caefisica/devcontainers/latex
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
dockerfile: [latex/full/Dockerfile, latex/min/Dockerfile]
include:
- dockerfile: latex/full/Dockerfile
tag_suffix: full
- dockerfile: latex/min/Dockerfile
tag_suffix: min
steps:
- name: Revisar repositorio
uses: actions/checkout@v3
- name: Instalar cosign
if: github.event_name != 'pull_request'
uses: sigstore/[email protected]
with:
cosign-release: 'v2.1.1'
- name: Configurar Docker buildx
uses: docker/setup-buildx-action@v1
- name: Iniciar sesión en el registro ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extraer metadatos de Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.tag_suffix }}
flavor: |
latest=auto
- name: Construir y publicar imagen Docker
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Firmar la imagen Docker publicada
if: ${{ github.event_name != 'pull_request' }}
env:
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}