forked from opendatahub-io/data-science-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 2.03 KB
/
Copy pathbuild-tools-images.yml
File metadata and controls
71 lines (62 loc) · 2.03 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build tools images
# This workflow is disabled for downstream.
on: []
# push:
# branches:
# - master
# - main
# - stable
# - 'release-*'
# - 'rhoai-*'
# pull_request:
# branches:
# - master
# - 'release-*'
# workflow_dispatch: {}
permissions:
contents: read
packages: write
env:
IMAGE_REGISTRY: ghcr.io
IMAGE_ORG: ${{ github.repository_owner }}
IMAGE_TAG: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}
concurrency:
group: build-tools-images-${{ github.ref_name }}
cancel-in-progress: false
jobs:
build-tools:
name: Build tools images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Read frontend Node version
id: frontend_node
run: echo "version=$(tr -d '\r\n' < frontend/.nvmrc | sed 's/^v//')" >> "$GITHUB_OUTPUT"
- name: Log in to the Container registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push api-generator
id: build_api
uses: docker/build-push-action@v6
with:
context: .
file: backend/api/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_ORG }}/kfp-api-generator:${{ env.IMAGE_TAG }}
- name: Build and push release tools
uses: docker/build-push-action@v6
with:
context: .
file: test/release/Dockerfile.release
push: ${{ github.event_name != 'pull_request' }}
build-args: |
BASE_IMAGE=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_ORG }}/kfp-api-generator:${{ env.IMAGE_TAG }}
NODE_VERSION=${{ steps.frontend_node.outputs.version }}
tags: |
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_ORG }}/kfp-release:${{ env.IMAGE_TAG }}