Skip to content

Add files to publish oci artifact #6

Add files to publish oci artifact

Add files to publish oci artifact #6

Workflow file for this run

name: Publish OCI Artifact
on:
push:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
jobs:
publish-artifact:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# 1. Download the repository code
- name: Checkout repository
uses: actions/checkout@v4
# 2. Configure ORAS CLI (Using the official action)
# https://github.com/marketplace/actions/setup-oras
- name: Set up ORAS
uses: oras-project/setup-oras@v1
with:
version: 1.3.0
# 3. Install JQ (Required to manipulate the JSON in the script)
- name: Install JQ (JSON Processor)
run: sudo apt-get update && sudo apt-get install -y jq
# 4. Login to GitHub Container Registry
- name: Log into GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | oras login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
# 5. Execute the publish script
# The script will automatically read GITHUB_REPOSITORY, GITHUB_SHA, etc.
- name: Execute Publish Script
run: |
chmod +x publish.sh
./publish.sh