mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
ci: add descriptions to built container images
This commit is contained in:
5
.github/workflows/build-container.yml
vendored
5
.github/workflows/build-container.yml
vendored
@@ -26,6 +26,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push the master container image
|
- name: Build and push the master container image
|
||||||
run: |
|
run: |
|
||||||
|
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||||
|
sed -i "2i LABEL org.opencontainers.image.description=\"RGBDS container image, containing the git version master:$COMMIT_HASH\"" Dockerfile
|
||||||
docker build . --tag ghcr.io/gbdev/rgbds:master
|
docker build . --tag ghcr.io/gbdev/rgbds:master
|
||||||
docker push ghcr.io/gbdev/rgbds:master
|
docker push ghcr.io/gbdev/rgbds:master
|
||||||
|
|
||||||
@@ -33,5 +35,6 @@ jobs:
|
|||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
run: |
|
run: |
|
||||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||||
docker tag ghcr.io/gbdev/rgbds:master ghcr.io/gbdev/rgbds:$TAG_NAME
|
sed -i "2i LABEL org.opencontainers.image.description=\"RGBDS container image for version $TAG_NAME\"" Dockerfile
|
||||||
|
docker build . --tag ghcr.io/gbdev/rgbds:$TAG_NAME
|
||||||
docker push ghcr.io/gbdev/rgbds:$TAG_NAME
|
docker push ghcr.io/gbdev/rgbds:$TAG_NAME
|
||||||
|
|||||||
Reference in New Issue
Block a user