Skip to content

Build huggingface Image #3

Build huggingface Image

Build huggingface Image #3

name: Build huggingface Image
on:
push:
branches: [ hug ]
paths:
- 'Dockerfile'
- 'index.js'
- 'package.json'
- 'index.html'
pull_request:
branches: [ hug ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: hug
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/hugws:latest
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=http server
org.opencontainers.image.licenses=MIT
cache-from: type=gha
cache-to: type=gha,mode=max