Skip to content

Commit

Permalink
build: update docker metadata via action
Browse files Browse the repository at this point in the history
  • Loading branch information
sytone committed Mar 19, 2022
1 parent 572c83e commit 653c501
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository_owner }}/obsidian-remote
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

Expand All @@ -39,7 +50,9 @@ jobs:
context: .
#file: ./Dockerfile
push: true # Will only build if this is not here
tags: ghcr.io/${{ github.repository_owner }}/obsidian-remote:latest
build-args: |
"BUILD_DATE=${{ steps.date.outputs.date }}"
"IMAGE_VERSION=${{ env.GITHUB_REF_NAME }}"
#tags: ghcr.io/${{ github.repository_owner }}/obsidian-remote:latest
# build-args: |
# "BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}"
# "IMAGE_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:focal

# set version label
ARG BUILD_DATE=unknown
ARG IMAGE_VERSION
ARG OBSIDIAN_VERSION=0.13.31

LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.source="https://github.com/sytone/obsidian-remote"
LABEL org.opencontainers.image.version="${IMAGE_VERSION}"
LABEL org.opencontainers.image.title="Container hosted Obsidian MD"
LABEL org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser"

Expand Down

0 comments on commit 653c501

Please sign in to comment.