Skip to content

Automatic building of IM2 RPMs for RHEL8 and RHEL9 #20

Automatic building of IM2 RPMs for RHEL8 and RHEL9

Automatic building of IM2 RPMs for RHEL8 and RHEL9 #20

Workflow file for this run

name: "UCloud release"
on:
push:
tags:
- "v*"
jobs:
build-im2:
strategy:
matrix:
os:
- container_image: almalinux:8
suffix: rhel8
- container_image: almalinux:9
suffix: rhel9
runs-on: ubuntu-latest
container: "${{ matrix.os.container_image }}"
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: Get tag version (without 'v')
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Display tag name
run: |
echo "Tag pushed: ${{ env.TAG_NAME }}"
echo "${{ env.TAG_NAME }}" > backend/version.txt
- name: "Install dependencies (DNF)"
run: "dnf install -y git make wget rpm-build rpmdevtools gcc"
- name: "Install Go 1.23.5"
run: |
cd /tmp;
wget 'https://go.dev/dl/go1.23.5.linux-amd64.tar.gz';
tar xvf go*;
ln -s `realpath go/bin/go` /usr/bin/go;
ln -s `realpath go/bin/gofmt` /usr/bin/gofmt;
cd $GITHUB_WORKSPACE;
- name: "Build ucloud-psql"
run: |
cd ./provider-integration/rpmbuild
make ucloud-psql
cd $GITHUB_WORKSPACE
- name: "Build ucloud-envoy"
run: |
cd ./provider-integration/rpmbuild
make ucloud-envoy
cd $GITHUB_WORKSPACE
- name: "Build ucloud-im"
run: |
cd ./provider-integration/rpmbuild
make ucloud-im
cd $GITHUB_WORKSPACE
- name: "Release assets"
uses: softprops/action-gh-release@v2
with:
files: |
./provider-integration/rpmbuild/ucloud-psql/RPMS/x86_64/*
./provider-integration/rpmbuild/ucloud-envoy/RPMS/x86_64/*
./provider-integration/rpmbuild/ucloud-im/RPMS/x86_64/*