-
Notifications
You must be signed in to change notification settings - Fork 73
116 lines (101 loc) · 3.19 KB
/
publish-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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Publish images
on:
pull_request:
branches: [ "master" ]
paths:
- "opencog/**"
- ".github/workflows/**"
push:
branches: [ "master" ]
paths:
- "opencog/**"
- ".github/workflows/**"
schedule:
- cron: "37 2 * * 6" # Run 2:37 AM Saturday night. `man 5 crontab`
workflow_dispatch:
jobs:
# The job is called "base-images".
# The Dockerfile is located in the directory opencog/base
# -- this is the "context"
# The name of the docker image is opencog/opencog-deps:latest
base-images:
runs-on: ubuntu-22.04
steps:
- name: Checkout current repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push opencog-deps to docker hub
uses: docker/build-push-action@v6
with:
context: opencog/base
tags: ${{ secrets.DOCKER_NAMESPACE }}/opencog-deps:latest
push: true
# Needs is the name of the job, above.
atomspace:
needs: base-images
runs-on: ubuntu-22.04
steps:
- name: Checkout current repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push to docker hub
uses: docker/build-push-action@v6
with:
context: opencog/${{ github.job }}
tags: ${{ secrets.DOCKER_NAMESPACE }}/${{ github.job }}:latest
push: true
learn:
needs: atomspace
runs-on: ubuntu-22.04
steps:
- name: Checkout current repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push to docker hub
uses: docker/build-push-action@v6
with:
context: opencog/${{ github.job }}
tags: ${{ secrets.DOCKER_NAMESPACE }}/${{ github.job }}:latest
push: true
# TODO: Create dockerfile & publish an as-moses image.
# as-moses:
# needs: atomspace
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout current repo
# uses: actions/checkout@v4
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
#
# - name: Login to DockerHub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
#
# - name: Build and push to docker hub
# uses: docker/build-push-action@v6
# with:
# XXX wrong context, fixme.
# context: archive/${{ github.job }}
# tags: ${{ secrets.DOCKER_NAMESPACE }}/${{ github.job }}:latest
# push: true