Filled Docker Labels and ENVs to identify the git revision it was build from (#250)

Added labels and env vars to identify the git revion a container was
build from to have a more transparent build flow of untaged images.
This commit is contained in:
2023-10-21 18:13:03 +02:00
committed by GitHub
parent 88f0673470
commit ad7aa3e53b
3 changed files with 27 additions and 4 deletions

View File

@ -168,9 +168,9 @@ jobs:
- name: Build All prior to push
run: |
docker build --target ingest .
docker build --target data-transformation .
docker build --target web-server .
docker build --target ingest --build-arg GIT_HASH=${{github.sha}} .
docker build --target data-transformation --build-arg GIT_HASH=${{github.sha}} .
docker build --target web-server --build-arg GIT_HASH=${{github.sha}} .
docker image ls
- name: Exit workflow on pull request
@ -187,6 +187,8 @@ jobs:
- name: Build and push ingest
uses: docker/build-push-action@v5
with:
build-args: |
"GIT_HASH=${{github.sha}}"
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/ingest:${{ env.TAG_OR_MAIN }}
@ -197,6 +199,8 @@ jobs:
- name: Build and push data-transformation
uses: docker/build-push-action@v5
with:
build-args: |
"GIT_HASH=${{github.sha}}"
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/data-transformation:${{ env.TAG_OR_MAIN }}
@ -207,6 +211,8 @@ jobs:
- name: Build and push web-server
uses: docker/build-push-action@v5
with:
build-args: |
"GIT_HASH=${{github.sha}}"
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/web-server:${{ env.TAG_OR_MAIN }}