-
Notifications
You must be signed in to change notification settings - Fork 39
56 lines (51 loc) · 1.36 KB
/
build-test-models.yaml
File metadata and controls
56 lines (51 loc) · 1.36 KB
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
name: Build test models
on:
push:
branches:
- '**'
# on: workflow_dispatch
permissions:
contents: write
packages: write
checks: write
attestations: write
id-token: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: build test model
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.24.5'
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
go mod download
- name: download models
run: |
go run testData/downloadModels.go
- name: List models directory
run: ls -l ./models
- name: Remove models from .dockerignore # make sure models folder is not ignored
run: sed -i '/^\/models$/d' .dockerignore
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: models.Dockerfile
tags: ghcr.io/knights-analytics/hugot/models:latest
push: true