Skip to content

Build and Push Docker Image #2

Build and Push Docker Image

Build and Push Docker Image #2

Workflow file for this run

name: Build and Push Docker Image
on:
push:
paths:
- 'docker/**'
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly rebuild
env:
REGISTRY: ghcr.io
IMAGE_NAME: resciencelab/tryskills-hermes
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: ./docker
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:0.1.0
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max