Skip to content

Commit

Permalink
set several more docker image annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
nam20485 committed Feb 18, 2024
1 parent 17ec030 commit fa8ed34
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,24 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}


- name: Create CURRENT_DATETIME Environment Variable
run: |
echo "CURRENT_DATETIME=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
- name: Echo CURRENT_DATETIME Environment Variable
env:
CURRENT_DATETIME: ${{ env.CURRENT_DATETIME }}
run: echo ${{ env.CURRENT_DATETIME }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
CURRENT_DATETIME: ${{ env.CURRENT_DATETIME }}
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -83,9 +94,15 @@ jobs:
type=ref,event=branch,suffix=-latest
annotations: |
org.opencontainers.image.source=https://github.com/nam20485/OdbDesign
org.opencontainers.image.description=A free open source cross-platform C++ library for parsing ODB++ Design archives and accessing their data. Exposed via a REST API and packaged inside of a Docker image. The OdbDesign Docker image runs the OdbDesignServer REST API server executable listening on port 8888.
org.opencontainers.image.description=A free open source cross-platform C++ library for parsing ODB++ Design archives and accessing their data. Exposed via a REST API and packaged inside of a Docker image. The OdbDesign Docker image runs the OdbDesign Server REST API server executable listening on port 8888.
org.opencontainers.image.licenses=MIT
org.opencontainers.image.authors=https://github.com/nam20485
org.opencontainers.image.authors=https://github.com/nam20485
org.opencontainers.image.url=https://nam20485.github.io/OdbDesign
org.opencontainers.image.documentation=https://github.com/nam20485/OdbDesign?tab=readme-ov-file
org.opencontainers.image.version=${{ github.ref_name }}-${{github.run_number}}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.created=${CURRENT_DATETIME}
org.opencontainers.image.title=OdbDesign Server
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand Down Expand Up @@ -126,4 +143,9 @@ jobs:
with:
repository: ${{ github.repository }}
event-type: trigger_deploy_release_event
client-payload: '{"ref_name": "${{ github.ref_name }}", "dispatch_id": "${{ secrets.DISPATCH_ID }}"}'
client-payload: |
'{
"ref_name": "${{ github.ref_name }}",
"run_number": "${{ github.run_number }}",
"dispatch_id": "${{ secrets.DISPATCH_ID }}"
}'

0 comments on commit fa8ed34

Please sign in to comment.