Skip to content

Merge pull request #114 from tgxn/develop #25

Merge pull request #114 from tgxn/develop

Merge pull request #114 from tgxn/develop #25

name: ghcr-image-main
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAG: latest
jobs:
build-and-publish-image:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAG }}
- name: Build and push Docker image to GHCR
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}