From 1849f034cd830048aa82d62503d01d47c019f15e Mon Sep 17 00:00:00 2001 From: Tine Jozelj Date: Sat, 26 Dec 2020 17:24:36 +0100 Subject: [PATCH] feat(packages:starship): use custom rust image --- .github/workflows/packages.yaml | 5 +++++ packages/Dockerfile.rust | 3 +++ packages/Dockerfile.starship | 3 ++- templates/actions/packages.yaml.tmpl | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/packages.yaml b/.github/workflows/packages.yaml index 57dcb3f..5ae55da 100644 --- a/.github/workflows/packages.yaml +++ b/.github/workflows/packages.yaml @@ -25,6 +25,7 @@ jobs: echo ::set-output name=docker_image::${DOCKER_IMAGE} echo ::set-output name=version::${VERSION} echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ + --build-arg REPOSITORY=ghcr.io/mentos1386 --build-arg VERSION=${VERSION} \ --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --build-arg VCS_REF=${GITHUB_SHA::8} \ @@ -78,6 +79,7 @@ jobs: echo ::set-output name=docker_image::${DOCKER_IMAGE} echo ::set-output name=version::${VERSION} echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ + --build-arg REPOSITORY=ghcr.io/mentos1386 --build-arg VERSION=${VERSION} \ --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --build-arg VCS_REF=${GITHUB_SHA::8} \ @@ -131,6 +133,7 @@ jobs: echo ::set-output name=docker_image::${DOCKER_IMAGE} echo ::set-output name=version::${VERSION} echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ + --build-arg REPOSITORY=ghcr.io/mentos1386 --build-arg VERSION=${VERSION} \ --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --build-arg VCS_REF=${GITHUB_SHA::8} \ @@ -184,6 +187,7 @@ jobs: echo ::set-output name=docker_image::${DOCKER_IMAGE} echo ::set-output name=version::${VERSION} echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ + --build-arg REPOSITORY=ghcr.io/mentos1386 --build-arg VERSION=${VERSION} \ --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --build-arg VCS_REF=${GITHUB_SHA::8} \ @@ -237,6 +241,7 @@ jobs: echo ::set-output name=docker_image::${DOCKER_IMAGE} echo ::set-output name=version::${VERSION} echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ + --build-arg REPOSITORY=ghcr.io/mentos1386 --build-arg VERSION=${VERSION} \ --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --build-arg VCS_REF=${GITHUB_SHA::8} \ diff --git a/packages/Dockerfile.rust b/packages/Dockerfile.rust index 15de0c9..2b5bcb4 100644 --- a/packages/Dockerfile.rust +++ b/packages/Dockerfile.rust @@ -1,5 +1,8 @@ FROM alpine:3.12 +LABEL maintainer="Tine Jozelj " +LABEL org.opencontainers.image.source https://github.com/mentos1386/workspace + RUN apk add --no-cache \ ca-certificates \ gcc diff --git a/packages/Dockerfile.starship b/packages/Dockerfile.starship index a19a39a..eccb3d1 100644 --- a/packages/Dockerfile.starship +++ b/packages/Dockerfile.starship @@ -1,4 +1,5 @@ -FROM rust:1-alpine as build +ARG REPOSITORY=ghcr.io/mentos1386 +FROM ${REPOSITORY}/rust:1.48.0 as build WORKDIR /usr/src/starship diff --git a/templates/actions/packages.yaml.tmpl b/templates/actions/packages.yaml.tmpl index 2030cb8..a35b61d 100644 --- a/templates/actions/packages.yaml.tmpl +++ b/templates/actions/packages.yaml.tmpl @@ -25,6 +25,7 @@ jobs: echo ::set-output name=docker_image::${DOCKER_IMAGE} echo ::set-output name=version::${VERSION} echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ + --build-arg REPOSITORY=[[[$.repository]]] --build-arg VERSION=${VERSION} \ --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ --build-arg VCS_REF=${GITHUB_SHA::8} \