-
Notifications
You must be signed in to change notification settings - Fork 18
62 lines (55 loc) · 1.72 KB
/
images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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@v4
with:
context: .
build-args: |
GITHUB_USER=instruct-lab-bot
GITHUB_TOKEN=${{ secrets.BOT_GITHUB_TOKEN }}
file: Dockerfile
push: true
tags: ${{ steps.bot_meta.outputs.tags }}
labels: ${{ steps.bot_meta.outputs.labels }}
- 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@v4
with:
context: .
build-args: |
GITHUB_USER=instruct-lab-bot
GITHUB_TOKEN=${{ secrets.BOT_GITHUB_TOKEN }}
file: Dockerfile.serve
push: true
tags: ${{ steps.labserve_meta.outputs.tags }}
labels: ${{ steps.labserve_meta.outputs.labels }}