Skip to content

Commit 8f5b737

Browse files
authored
Fix wrong gitVersion info and github action failed on arm (#211)
* Fix some minor bugs Signed-off-by: Cwen Yin <[email protected]> * add some comments Signed-off-by: Cwen Yin <[email protected]> Signed-off-by: Cwen Yin <[email protected]>
1 parent 25e098e commit 8f5b737

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

.github/workflows/release_latest.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@ jobs:
2424
- name: Prepare build environment
2525
run: |
2626
# actions/checkout require git v2.X
27-
if [ "${{ matrix.arch }}" == "amd64" ]; then
28-
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
29-
fi
30-
yum install -y gcc
31-
yum install -y make
32-
yum install -y binutils
33-
yum install -y git
27+
yum install -y gcc make binutils centos-release-scl
28+
yum install -y rh-git227-git
29+
echo /opt/rh/rh-git227/root/usr/bin >> $GITHUB_PATH
30+
echo "LD_LIBRARY_PATH=/opt/rh/httpd24/root/usr/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
3431
3532
- uses: actions/checkout@master
3633
with:

.github/workflows/release_tag.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ on:
66
jobs:
77
run:
88
name: Upload
9-
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
arch: [amd64, arm64]
13+
runs-on: ${{ fromJson('{"amd64":"ubuntu-latest", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }}
1014
# glibc version 2.17
11-
container: docker.io/centos:7.2.1511
15+
container: ${{ fromJson('{"amd64":"docker.io/centos:7.2.1511", "arm64":"docker.io/centos:centos7"}')[matrix.arch] }}
1216
steps:
1317
- name: Set up Go 1.18
1418
uses: actions/setup-go@v1
@@ -19,11 +23,10 @@ jobs:
1923
- name: Prepare build environment
2024
run: |
2125
# actions/checkout require git v2.X
22-
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
23-
yum install -y gcc
24-
yum install -y make
25-
yum install -y binutils
26-
yum install -y git
26+
yum install -y gcc make binutils centos-release-scl
27+
yum install -y rh-git227-git
28+
echo /opt/rh/rh-git227/root/usr/bin >> $GITHUB_PATH
29+
echo "LD_LIBRARY_PATH=/opt/rh/httpd24/root/usr/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
2730
2831
- uses: actions/checkout@master
2932
with:
@@ -45,6 +48,6 @@ jobs:
4548
- name: Upload files
4649
run: |
4750
GIT_TAG=${GITHUB_REF##*/}
48-
mv bin chaosd-${GIT_TAG}-linux-amd64
49-
tar czvf chaosd-${GIT_TAG}-linux-amd64.tar.gz chaosd-${GIT_TAG}-linux-amd64
50-
aws s3 cp chaosd-${GIT_TAG}-linux-amd64.tar.gz ${{ secrets.AWS_BUCKET_NAME }}/chaosd-${GIT_TAG}-linux-amd64.tar.gz
51+
mv bin chaosd-${GIT_TAG}-linux-${{ matrix.arch }}
52+
tar czvf chaosd-${GIT_TAG}-linux-${{ matrix.arch }}.tar.gz chaosd-${GIT_TAG}-linux-${{ matrix.arch }}
53+
aws s3 cp chaosd-${GIT_TAG}-linux-${{ matrix.arch }}.tar.gz ${{ secrets.AWS_BUCKET_NAME }}/chaosd-${GIT_TAG}-linux-${{ matrix.arch }}.tar.gz

0 commit comments

Comments
 (0)