From 9c4f226ca00506204e35628e508e7dfadb863c7c Mon Sep 17 00:00:00 2001 From: Kresten Laust Date: Sat, 15 Feb 2025 10:49:16 +0100 Subject: [PATCH] Add version parameter to action --- .github/workflows/integration.yml | 1 + Dockerfile | 3 ++- action.yml | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 3cd6c30..8cb5630 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -12,6 +12,7 @@ jobs: source_file: | tests/valid.typ tests/math.typ + version: v0.12.0 options: | --font-path fonts/ diff --git a/Dockerfile b/Dockerfile index 71a721d..06f57a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM ghcr.io/typst/typst +ARG VERSION=latest +FROM ghcr.io/typst/typst:${VERSION} LABEL \ org.opencontainers.image.title="Typst GitHub action based on ghcr.io/typst/typst image" \ diff --git a/action.yml b/action.yml index 52b73e3..7229be7 100644 --- a/action.yml +++ b/action.yml @@ -30,9 +30,16 @@ inputs: fonts required: false default: "" + version: + description: > + The version tag of ghcr.io/typst/typst, defaults to "latest" + required: false + default: "latest" runs: using: docker image: Dockerfile args: - ${{ inputs.source_file }} - ${{ inputs.options }} + build-args: + VERSION: ${{ inputs.version }}