Skip to content

Docker Image CI

Docker Image CI #35

Workflow file for this run

name: Docker Image CI
on:
push:
tags: ["*"]
workflow_dispatch:
schedule: [cron: "0 0 1 * *"]
env:
# Download artefacts fails if summery upload is on
DOCKER_BUILD_RECORD_UPLOAD: false
jobs:
docker-base-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
[
"debian:bullseye-slim",
"debian:bookworm-slim",
"ubuntu:focal",
"ubuntu:jammy",
]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set tags
run: |
echo "Setting tags..."
if [ "${{ matrix.variant }}" = "debian:bookworm-slim" ]; then
echo "LATEST_TAG=${{ github.actor }}/vscode-latex:latest" >> $GITHUB_ENV
echo "Added latest tag"
fi
echo "TAG_NAME=$(echo "${{ matrix.variant }}" | awk -F: '{print $NF}' | cut -d "-" -f1)" >> $GITHUB_ENV
docker system prune --all --force
- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: VARIANT=${{ matrix.variant }}
push: true
sbom: true
context: build
file: build/Dockerfile.base
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
${{ github.actor }}/vscode-latex:${{ env.TAG_NAME }}-${{ github.sha }}
${{ github.actor }}/vscode-latex:${{ env.TAG_NAME }}
${{ env.LATEST_TAG }}
docker-lang-build:
runs-on: ubuntu-latest
needs: docker-base-build
strategy:
matrix:
fail-fast: false

Check failure on line 66 in .github/workflows/docker-build.yml

View workflow run for this annotation

GitHub Actions / Docker Image CI

Invalid workflow file

The workflow is not valid. .github/workflows/docker-build.yml (Line: 66, Col: 20): Unexpected value 'false'
variant: ["debian:bookworm-slim", "ubuntu:jammy"]
lang:
[
all,
arabic,
chinese,
cjk,
cyrillic,
czechslovak,
english,
european,
french,
german,
greek,
italian,
japanese,
korean,
other,
polish,
portuguese,
spanish,
]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set tags
run: |
echo "Setting tags..."
echo "TAG_NAME=$(echo "${{ matrix.variant }}" | awk -F: '{print $NF}' | cut -d "-" -f1)" >> $GITHUB_ENV
docker system prune --all --force
- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: |
VARIANT=${{ env.TAG_NAME }}
LANG=${{ matrix.lang }}
push: true
sbom: true
context: build
file: build/Dockerfile.language
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ github.actor }}/vscode-latex:${{ env.TAG_NAME }}-lang-${{ matrix.lang }}
docker-full-build:
runs-on: ubuntu-latest
needs: docker-base-build
strategy:
fail-fast: false
matrix:
variant: ["debian:bookworm-slim", "ubuntu:jammy"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set tags
run: |
echo "Setting tags..."
echo "TAG_NAME=$(echo "${{ matrix.variant }}" | awk -F: '{print $NF}' | cut -d "-" -f1)" >> $GITHUB_ENV
docker system prune --all --force
- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: VARIANT=${{ env.TAG_NAME }}
push: true
sbom: true
context: build
file: build/Dockerfile.full
platforms: linux/amd64,linux/arm64
tags: ${{ github.actor }}/vscode-latex:${{ env.TAG_NAME }}-full