48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: 'Package and Publish'
|
|
description: 'Publish actions as OCI artifacts to GHCR'
|
|
|
|
# TODO: Add your action's branding here. This will appear on the GitHub Marketplace.
|
|
branding:
|
|
icon: 'heart'
|
|
color: 'red'
|
|
|
|
inputs:
|
|
path:
|
|
required: false
|
|
description: The work directory or path to be tar archived and uploaded as OCI Artifact layer.
|
|
default: '.'
|
|
registry:
|
|
required: false
|
|
description: The registry to publish the action package to.
|
|
default: https://ghcr.io/ # TODO: this should perhaps be fetched from GitHub API.
|
|
|
|
outputs:
|
|
package-url:
|
|
description: 'The name of package published to GHCR along with semver. For example, https://ghcr.io/actions/package-action:1.0.1'
|
|
package-manifest:
|
|
description: 'The package manifest of the published package in JSON format'
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- run: ls
|
|
shell: bash
|
|
# - run: node ./dist/index.js
|
|
# shell: bash
|
|
- uses: ddivad195/publish-action-package/package-and-publish@v0.0.58
|
|
id: publish
|
|
env:
|
|
TOKEN: ${{ github.token }}
|
|
who_to_greet: ${{ env.registry }}
|
|
- name: Output variables
|
|
shell: bash
|
|
run: |
|
|
echo "package manifest": ${{steps.publish.outputs.package-manifest}}
|
|
echo "package manifest": ${{steps.publish.outputs.package-url}}
|
|
echo "package-manifest=${{steps.publish.outputs.package-manifest}}" >> $GITHUB_OUTPUT
|
|
echo "package-url=${{steps.publish.outputs.package-url}}" >> $GITHUB_OUTPUT
|
|
cat $GITHUB_OUTPUT
|
|
|
|
# runs:
|
|
# using: node20
|
|
# main: dist/index.js
|