Skip to content

Publish Container

Publish Container #1

name: Publish Container
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for the Docker image'
required: false
default: 'latest' # Default tag is 'latest' if no input is provided
permissions:
contents: read
pages: write
packages: write
id-token: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}/gamedoora-ui:${{ github.event.inputs.tag }}