From 901a11382d95ade7ce136c83e297d12326048e33 Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Wed, 26 Feb 2025 02:08:58 -0700 Subject: [PATCH] ci: add README.md cache to deployment workflow, inject docker label `org.opencontainers.image.description`` --- .github/workflows/deploy-docker-github.yml | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/deploy-docker-github.yml b/.github/workflows/deploy-docker-github.yml index a9d79774..5c26243e 100755 --- a/.github/workflows/deploy-docker-github.yml +++ b/.github/workflows/deploy-docker-github.yml @@ -324,6 +324,29 @@ jobs: username: ${{ env.IMAGE_GHCR_USERNAME }} password: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }} + # # + # Release › Github › Read Readme + # # + + - name: '📄 Cache README.md' + id: task_release_gh_readme_cache + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.ORG_BINARYNINJA_TOKEN_CL }} + script: | + 'use strict' + + const { promises: fs } = require('fs') + + const main = async () => { + const path = 'README.md' + let content = await fs.readFile(path, 'utf8') + + core.setOutput('content', content) + } + + main().catch(err => core.setFailed(err.message)) + # # # Release › Github › Meta # # @@ -360,6 +383,7 @@ jobs: labels: | org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }} org.opencontainers.image.version=${{ env.IMAGE_VERSION }} + org.opencontainers.image.description=${{ steps.task_release_gh_readme_cache.outputs.content }} org.opencontainers.image.licenses=MIT org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}