Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Publish Docker image (Without Tag Released) #5

Publish Docker image (Without Tag Released)

Publish Docker image (Without Tag Released) #5

#################################################
# Author : @H0llyW00dzZ #
# Note : This Using Github Container #
# Which Pretty usefull for github pro plans #
#################################################
name: Publish Docker image (Without Tag Released)
on:
workflow_dispatch:
inputs:
tag_version:
description: 'Enter the tag version for the Docker image'
required: true
description:
description: 'Enter the description for the Docker image'
required: true
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to GitHub Container Registry
runs-on: ubuntu-latest
steps:
-
name: Check out the repo
uses: actions/checkout@v3
-
name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: yidadaa/chatgpt-next-web
tags: |
type=raw,value=latest
type=ref,event=tag
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/h0llyw00dzz/chatgpt-next-web:${{ github.event.inputs.tag_version }}
labels: |
${{ steps.meta.outputs.labels }}
org.opencontainers.image.description="${{ github.event.inputs.description }}"
cache-from: type=gha
cache-to: type=gha,mode=max