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 72 73 74 75 76 77 78
|
name: install
on:
pull_request:
branches:
- master
- release-*
paths:
- 'install.sh'
push:
branches:
- release-*
paths:
- 'install.sh'
jobs:
install:
name: Install
runs-on: ubuntu-22.04
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Install And Check
working-directory: ${{ env.working-directory }}
run: |
sh install.sh
source ~/.profile
which tiup || (echo "no tiup found" && exit 1)
! tiup update --self | grep -i "WARN: adding root certificate"
tiup --version
local_install:
name: Local Install
runs-on: ubuntu-latest
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.21.x
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Build TiUP
working-directory: ${{ env.working-directory }}
run: make tiup
- name: Setup TiUP
run: |
mkdir -p ~/.tiup/bin
curl https://tiup-mirrors.pingcap.com/root.json -o ~/.tiup/bin/root.json
- name: Clone Mirror
working-directory: ${{ env.working-directory }}
run: ./bin/tiup mirror clone test-mirror
- name: Local Install And Check
working-directory: ${{ env.working-directory }}/test-mirror
run: |
sh local_install.sh
source ~/.profile
which tiup || (echo "no tiup found" && exit 1)
tiup --version
cp ../bin/tiup $(which tiup)
! tiup list | grep -i "WARN: adding root certificate"
tiup --version
|