mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 08:13:55 +02:00
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:
12
.github/workflows/test-and-build-action.yaml
vendored
12
.github/workflows/test-and-build-action.yaml
vendored
@ -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 }}
|
||||
|
Reference in New Issue
Block a user