Skip to content

fix: change package visibility #2

fix: change package visibility

fix: change package visibility #2

Workflow file for this run

name: Release
on:
push:
branches:
- main
tags:
- 'v*.*.*' # Only consider tags in the format v0.0.0
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
release-package:
name: Release package
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
context: .
push: true
visibility: public
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
- name: Inspect image
run: |
TAG=${{ github.ref == 'refs/heads/main' && 'dev' || github.ref_name }}
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG}