mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 04:55:42 -04:00
ci: add workflow steps for digest exporting and readme extraction
This commit is contained in:
86
.github/workflows/deploy-docker-gitea.yml
vendored
86
.github/workflows/deploy-docker-gitea.yml
vendored
@@ -6,8 +6,11 @@
|
||||
# upload this workflow to both the `main` branch of the tvapp2 repository
|
||||
# @secrets secrets.ADMINSERV_GPG_KEY_ASC gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
|
||||
# secrets.ADMINSERV_GPG_PASSPHRASE gpg private key passphrase
|
||||
# secrets.ORG_BINARYNINJA_TOKEN github personal access token (fine-grained)
|
||||
# secrets.ORG_BINARYNINJA_TOKEN_CL github personal access token (classic)
|
||||
# secrets.ORG_BINARYNINJA_DOCKERHUB_TOKEN dockerhub secret
|
||||
# secrets.ORG_BINARYNINJA_GITEA_TOKEN gitea personal access token (classic) with package:write permission
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES Discord webhook to report releases from gitea to discord
|
||||
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES discord webhook to report releases from github to discord
|
||||
# #
|
||||
|
||||
name: "📦 Deploy › Docker › Gitea"
|
||||
@@ -339,6 +342,31 @@ jobs:
|
||||
username: ${{ env.IMAGE_GITEA_USERNAME }}
|
||||
password: ${{ secrets.ORG_BINARYNINJA_GITEA_TOKEN }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Read Readme
|
||||
#
|
||||
# @usage org.opencontainers.image.description=${{ steps.task_release_gi_readme_cache.outputs.content }}
|
||||
# #
|
||||
|
||||
- name: '📄 Cache README.md'
|
||||
id: task_release_gi_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 › Gitea › Meta › amd64
|
||||
#
|
||||
@@ -530,6 +558,34 @@ jobs:
|
||||
VERSION=${{ env.IMAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Export Digest › Amd64
|
||||
# #
|
||||
|
||||
- name: '📄 Export Digest (linux/amd64)'
|
||||
id: task_release_gi_digest_export_amd64
|
||||
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
|
||||
run: |
|
||||
mkdir -p /tmp/build-digest-amd64
|
||||
digest="${{ steps.task_release_gi_push_amd64.outputs.digest }}"
|
||||
digest="${digest#sha256:}"
|
||||
touch "/tmp/build-digest-amd64/$digest"
|
||||
shell: bash
|
||||
|
||||
# #
|
||||
# Release › Gitea › Upload Digest › Amd64
|
||||
# #
|
||||
|
||||
- name: '🔼 Upload Digest (linux/amd64)'
|
||||
id: task_release_gi_digest_upload_amd64
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
|
||||
with:
|
||||
name: digest-amd64
|
||||
path: /tmp/build-digest-amd64/*
|
||||
if-no-files-found: error
|
||||
retention-days: 10
|
||||
|
||||
# #
|
||||
# Release › Gitea › Build and Push › Arm64
|
||||
# #
|
||||
@@ -553,6 +609,34 @@ jobs:
|
||||
VERSION=${{ env.IMAGE_VERSION }}
|
||||
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
|
||||
|
||||
# #
|
||||
# Release › Gitea › Export Digest › Arm64
|
||||
# #
|
||||
|
||||
- name: '📄 Export Digest (linux/arm64)'
|
||||
id: task_release_gi_digest_export_arm64
|
||||
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
|
||||
run: |
|
||||
mkdir -p /tmp/build-digest-arm64
|
||||
digest="${{ steps.task_release_gi_push_arm64.outputs.digest }}"
|
||||
digest="${digest#sha256:}"
|
||||
touch "/tmp/build-digest-arm64/$digest"
|
||||
shell: bash
|
||||
|
||||
# #
|
||||
# Release › Gitea › Upload Digest › Arm64
|
||||
# #
|
||||
|
||||
- name: '🔼 Upload Digest (linux/arm64)'
|
||||
id: task_release_gi_digest_upload_arm64
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
|
||||
with:
|
||||
name: digest-arm64
|
||||
path: /tmp/build-digest-arm64/*
|
||||
if-no-files-found: error
|
||||
retention-days: 10
|
||||
|
||||
# #
|
||||
# Release › Gitea › Push Manifest
|
||||
# #
|
||||
|
||||
Reference in New Issue
Block a user