CI now pushes fez5587/momentum-app to Docker Hub alongside GHCR (creds via repo secrets). First push done manually and verified anonymously pullable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: docker-image
|
|
|
|
# Build + push the app image to GHCR on every master push, so pull-only
|
|
# hosts (TrueNAS SCALE custom apps) can deploy without a repo checkout.
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- "Dockerfile"
|
|
- "requirements.txt"
|
|
- "**.py"
|
|
- ".github/workflows/docker.yml"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
ghcr.io/fez5587/momentum-app:latest
|
|
ghcr.io/fez5587/momentum-app:${{ github.sha }}
|
|
fez5587/momentum-app:latest
|
|
fez5587/momentum-app:${{ github.sha }}
|