build: Deploy ImHex-Web as a docker image

This commit is contained in:
WerWolv
2026-01-10 14:09:58 +01:00
parent 9e165ac4a1
commit d9eb01b526
2 changed files with 54 additions and 0 deletions

View File

@@ -1276,3 +1276,48 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: .github/scripts/delete-artifact.sh github-pages
docker-image-deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
permissions:
contents: read
packages: write
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
- name: ⬇️ Download artifact
uses: actions/download-artifact@v4
with:
name: ImHex Web
path: out
- name: 📜 Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: ⛓️ Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/imhex-web
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: 🔨 Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: dist/web/Host.Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}