diff --git a/.github/workflows/callable-build-docker.yml b/.github/workflows/callable-build-docker.yml index ba22f9b..b003383 100644 --- a/.github/workflows/callable-build-docker.yml +++ b/.github/workflows/callable-build-docker.yml @@ -91,6 +91,10 @@ jobs: platforms: "linux/amd64" tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} + VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} + REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} - name: Generate artifact attestation uses: actions/attest-build-provenance@v2 diff --git a/.github/workflows/on-pr-update.yml b/.github/workflows/on-pr-update.yml index 07af446..71ea619 100644 --- a/.github/workflows/on-pr-update.yml +++ b/.github/workflows/on-pr-update.yml @@ -17,4 +17,4 @@ jobs: uses: ./.github/workflows/callable-build-docker.yml secrets: inherit with: - push: false + push: true diff --git a/Dockerfile b/Dockerfile index 8ec72f4..2e78e47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,14 @@ FROM node:20.11-alpine WORKDIR /usr/src/app + +ARG BUILDTIME +ARG VERSION +ARG REVISION + +ENV BUILDTIME=${BUILDTIME} +ENV VERSION=${VERSION} +ENV REVISION=${REVISION} + COPY package*.json ./ RUN npm install COPY . .