Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Tweak labels
Browse files Browse the repository at this point in the history
  • Loading branch information
blootsvoets committed Nov 17, 2020
1 parent 563859d commit 3727238
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
# Log into docker hub if we're going to push the result
- name: Login to DockerHub
uses: docker/login-action@v1
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

# Add Docker labels and tags
- name: Docker meta
id: docker_meta
Expand All @@ -78,14 +86,20 @@ jobs:
file: ./Dockerfile
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
load: true
push: ${{ github.event_name != 'pull_request' }} # Push the master branch only
load: ${{ github.event_name == 'pull_request' }} # Otherwise, just load it locally
tags: ${{ steps.docker_meta.outputs.tags }}
# Use runtime labels from docker_meta as well as fixed labels
labels: |
${{ steps.docker_meta.outputs.labels }}
org.opencontainers.image.authors="Joris Borgdorff <joris@thehyve.nl>, Lee Evans - www.ltscomputingllc.com"
org.opencontainers.image.vendor="OHDSI"
maintainer=Joris Borgdorff <joris@thehyve.nl>, Lee Evans - www.ltscomputingllc.com
org.opencontainers.image.authors=Joris Borgdorff <joris@thehyve.nl>, Lee Evans - www.ltscomputingllc.com
org.opencontainers.image.vendor=OHDSI
# If the image was pushed, we need to pull it again to inspect it
- name: Pull image
if: ${{ github.event_name != 'pull_request' }}
run: docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}

- name: Inspect image
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ jobs:
# Use runtime labels from docker_meta as well as fixed labels
labels: |
${{ steps.docker_meta.outputs.labels }}
org.opencontainers.image.authors="Joris Borgdorff <joris@thehyve.nl>, Lee Evans - www.ltscomputingllc.com"
org.opencontainers.image.vendor="OHDSI"
maintainer=Joris Borgdorff <joris@thehyve.nl>, Lee Evans - www.ltscomputingllc.com
org.opencontainers.image.authors=Joris Borgdorff <joris@thehyve.nl>, Lee Evans - www.ltscomputingllc.com
org.opencontainers.image.vendor=OHDSI
- name: Inspect image
run: |
docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}

0 comments on commit 3727238

Please sign in to comment.