Skip to content

Commit

Permalink
Ci centos eol (#50)
Browse files Browse the repository at this point in the history
* build: update build env

* build(deps): bump docker/build-push-action from 5 to 6

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: patch_yum_repo.sh

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
aceforeverd and dependabot[bot] authored Sep 26, 2024
1 parent 7b9626f commit b73355f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fail-fast: true
matrix:
include:
- container: ghcr.io/aceforeverd/hybridsql-base:0.4.0
- container: ghcr.io/4paradigm/hybridsql-base:latest
flags: ""
distro: centos
- container: ubuntu:20.04
Expand All @@ -50,31 +50,26 @@ jobs:
env:
MAKEOPTS: -j2
DISTRO: ${{ matrix.distro }}

ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: setup deps
if: startsWith(matrix.container, 'ubuntu')
run: |
apt update
DEBIAN_FRONTEND=noninteractive apt-get install -y bison python3-dev libcppunit-dev build-essential cmake autoconf tcl pkg-config git curl patch libtool-bin
- name: setup deps(centos)
if: startsWith(matrix.container, 'ghcr')
run: |
yum install -y patch
- name: download thirdparty source
uses: actions/checkout@v2
uses: actions/checkout@v3
if: github.event_name == 'push' || github.event_name == 'pull_request'
with:
repository: ${{ env.OPENMLDB_REPO }}
ref: ${{ env.OPENMLDB_REF }}
path: openmldb

- name: download thirdparty source (workflow_dispatch)
uses: actions/checkout@v2
uses: actions/checkout@v3
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ github.event.inputs.OPENMLDB_REPO }}
Expand All @@ -98,7 +93,7 @@ jobs:
- name: Upload Artifact
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && github.event.inputs.UPLOAD == true)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: deps/thirdparty-*.tar.gz

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Build And Push
id: docker_build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: ${{ env.PUSH }}
Expand Down
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ FROM centos:7

ARG TARGETARCH

# hadolint ignore=DL3031
RUN yum update -y && yum install -y centos-release-scl epel-release && yum clean all

RUN yum install -y devtoolset-8 rh-git227 flex autoconf automake unzip bc expect libtool \
COPY ./patch_yum_repo.sh /
# hadolint ignore=DL3031,DL3033
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \
yum update -y && yum install -y centos-release-scl epel-release && \
/patch_yum_repo.sh && \
yum install -y devtoolset-8 rh-git227 flex autoconf automake unzip bc expect libtool \
rh-python38-python-devel gettext byacc xz tcl cppunit-devel rh-python38-python-wheel patch \
&& yum clean all
&& yum clean all && rm /patch_yum_repo.sh

COPY setup_cmake.sh /
RUN /setup_cmake.sh ${TARGETARCH} && rm -f setup_cmake.sh
Expand Down
11 changes: 11 additions & 0 deletions patch_yum_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e

sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

if [[ "$(arch)" = "aarch64" ]]; then
sed -i s/vault.centos.org\\/centos/vault.centos.org\\/altarch/g /etc/yum.repos.d/*.repo
fi

0 comments on commit b73355f

Please sign in to comment.