Skip to content

Commit 586f195

Browse files
Merge pull request #64 from opendatahub-io/main
Sync main and release branches
2 parents d8c81a3 + 9e70e39 commit 586f195

File tree

103 files changed

+4903
-10898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4903
-10898
lines changed

.github/actions/free-up-disk-space/action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,27 @@ runs:
1212
df -h
1313
echo "Removing non-essential tools and libraries ..."
1414
sudo rm -rf /opt/ghc
15+
sudo rm -rf /usr/local/.ghcup
1516
sudo rm -rf /usr/share/dotnet
1617
# sudo rm -rf /usr/local/share/boost
1718
echo "Deleting libraries for Android (12G), CodeQL (5.3G), PowerShell (1.3G), Swift (1.7G) ..."
1819
sudo rm -rf /usr/local/lib/android
1920
sudo rm -rf "${AGENT_TOOLSDIRECTORY}/CodeQL"
2021
sudo rm -rf /usr/local/share/powershell
2122
sudo rm -rf /usr/share/swift
23+
# ref: https://github.com/jlumbroso/free-disk-space/blob/main/action.yml
24+
echo "Deleting some larger apt packages:"
25+
sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..."
26+
sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..."
27+
sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..."
28+
sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..."
29+
sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..."
30+
sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..."
31+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."
32+
sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..."
33+
sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..."
34+
sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..."
35+
sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..."
2236
echo "Disk usage after cleanup:"
2337
df -h
2438

.github/workflows/build.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ defaults:
2222
shell: bash
2323

2424
env:
25-
CI: true
26-
SERVER_IMAGE_NAME: "text-gen-server:0"
27-
SERVER_IMAGE: "ghcr.io/ibm/text-gen-server:latest" # TODO: consider publishing to quay.io or icr.io instead
25+
SERVER_IMAGE: "quay.io/wxpe/text-gen-server"
26+
IMAGE_REGISTRY: "quay.io"
2827

2928
jobs:
3029
build:
@@ -50,8 +49,17 @@ jobs:
5049
- name: "Set up Docker Buildx"
5150
uses: docker/setup-buildx-action@v3
5251

53-
- name: "Log in to cache image container registry"
52+
- name: "Log in to container registry (server-release)"
5453
uses: docker/login-action@v3
54+
if: github.event_name != 'pull_request'
55+
with:
56+
registry: ${{ env.IMAGE_REGISTRY }}
57+
username: ${{ secrets.WXPE_QUAY_USER }}
58+
password: ${{ secrets.WXPE_QUAY_TOKEN }}
59+
60+
- name: "Log in to container registry (cache image)"
61+
uses: docker/login-action@v3
62+
if: github.event_name != 'pull_request'
5563
with:
5664
registry: ${{ env.CACHE_REGISTRY }}
5765
username: ${{ github.actor }}
@@ -78,12 +86,25 @@ jobs:
7886
fi
7987
echo "CACHE_TO=$CACHE_TO" >> $GITHUB_ENV
8088
89+
- name: "Generate tags"
90+
id: meta
91+
uses: docker/metadata-action@v5
92+
with:
93+
images: |
94+
${{ env.SERVER_IMAGE }}
95+
tags: |
96+
type=ref,event=branch
97+
type=semver,pattern={{version}}
98+
type=semver,pattern={{major}}.{{minor}}
99+
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
100+
type=sha,enable=true,priority=100,prefix=${{ github.ref_name }}.,suffix=,format=short
101+
81102
- name: "Docker build server-release"
82103
uses: docker/build-push-action@v5
83104
with:
84105
context: .
85106
target: server-release
86-
tags: ${{ env.SERVER_IMAGE }}
107+
tags: ${{ steps.meta.outputs.tags }}
87108
cache-from: type=registry,ref=${{ env.CACHE_IMAGE }}
88109
cache-to: ${{ env.CACHE_TO }}
89110
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747

4848
- name: "Log in to cache image container registry"
4949
uses: docker/login-action@v3
50+
if: github.event_name != 'pull_request'
5051
with:
5152
registry: ${{ env.CACHE_REGISTRY }}
5253
username: ${{ github.actor }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
target
3-
router/src/pb/
3+
router/src/pb
4+
router/client/src/pb

0 commit comments

Comments
 (0)