Skip to content
name: Build & Push Train Task
on:
push:
branches: [ "main" ]
paths:
- "docker/train/**"
- "src/train/**"
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/train-task
tags: |
type=raw,value=latest
- name: Build & Push Train Task Image
uses: docker/build-push-action@v4
with:
context: .
file: docker/train/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}