-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (48 loc) · 1.65 KB
/
build_image.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
name: Build images
on:
push:
branches: [main]
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Store version number (on release)
id: version
if: ${{ github.event_name == 'release' }}
# GITHUB_REF looks like "refs/tags/v0.3.1" - we need to extract the actual version without the v prefix
run: echo "number=${GITHUB_REF##*/}" | sed 's/^v//' >> $GITHUB_OUTPUT
# Build all images
- name: Build and push "base" image
uses: docker/build-push-action@v6
with:
load: true
push: true
context: images/base
tags: |
blsq/openhexa-base-environment:${{ steps.version.outputs.number || 'main' }}
blsq/openhexa-base-environment:latest
- name: Build and push "legacy" image
uses: docker/build-push-action@v6
with:
push: true
context: images/legacy
tags: |
blsq/openhexa-legacy-environment:${{ steps.version.outputs.number || 'main' }}
blsq/openhexa-legacy-environment:latest
- name: Build and push "blsq" image
uses: docker/build-push-action@v6
with:
push: true
context: images/blsq
tags: |
blsq/openhexa-blsq-environment:${{ steps.version.outputs.number || 'main' }}
blsq/openhexa-blsq-environment:latest