Skip to content

bump docker-build-push to v5 #13

bump docker-build-push to v5

bump docker-build-push to v5 #13

Workflow file for this run

name: Publish Docker image
on:
push:
branches:
- main
jobs:
push_to_registries:
name: Push Docker image to GHCR
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for bot image
id: bot_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}/instruct-lab-bot
- name: Build and push bot image
uses: docker/build-push-action@v5
with:
context: .
build-args: |
GITHUB_USER=instruct-lab-bot
GITHUB_TOKEN=${{ secrets.BOT_GITHUB_TOKEN }}
target: bot
push: true
tags: ${{ steps.bot_meta.outputs.tags }}
labels: ${{ steps.bot_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Extract metadata (tags, labels) for labserve image
id: labserve_meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}/instruct-lab-serve
- name: Build and push serve image
uses: docker/build-push-action@v5
with:
context: .
build-args: |
GITHUB_USER=instruct-lab-bot
GITHUB_TOKEN=${{ secrets.BOT_GITHUB_TOKEN }}
target: serve
push: true
tags: ${{ steps.labserve_meta.outputs.tags }}
labels: ${{ steps.labserve_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max