diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 956d5d3..1726f54 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -10,6 +10,10 @@ on: branches: - 'main' +env: + mtk_version: v2.0.2 + + jobs: docker: runs-on: ubuntu-latest @@ -54,3 +58,5 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + MTK_VERSION=$mtk_version diff --git a/Dockerfile b/Dockerfile index b7d5e40..f63dd2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ +ARG MTK_VERSION + # build MTK from source FROM golang:1.18-alpine as builder WORKDIR /go/src/github.com/skpr RUN apk add --virtual --update-cache git && \ rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* -RUN git clone https://github.com/skpr/mtk.git && cd mtk && git checkout 0c133b920123f05404854f3aacf44f05e6d20e03 +RUN git clone https://github.com/skpr/mtk.git && cd mtk && git checkout $MTK_VERSION WORKDIR /go/src/github.com/skpr/mtk/dump # compile diff --git a/renovate.json b/renovate.json index e054dea..7cd58bb 100644 --- a/renovate.json +++ b/renovate.json @@ -9,5 +9,17 @@ "matchDepTypes": ["action"], "groupName": "GitHub actions" } - ] - } + ], + // MTK version -- really wanted to put this in a .env or something, but this was as close as I could get + customManagers: [ + { + customType: 'regex', + fileMatch: ['.github/workflows/docker-image.yaml'], + matchStrings: [ + 'env:\\s*mtk_version=(?.*?)', + ], + depName: 'skpr/mtk', + datasourceTemplate: 'github-tags', + }, + ], +}