-
Notifications
You must be signed in to change notification settings - Fork 454
70 lines (59 loc) · 1.86 KB
/
apisix_push_docker_hub.yaml
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
name: Push apisix to Docker image
on:
push:
branches: ['release/apisix-**']
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- debian
- redhat
env:
APISIX_DOCKER_TAG: 3.8.0-${{ matrix.platform }}
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Build and run
run: |
make build-on-${{ matrix.platform }}
docker-compose -f ./compose/docker-compose-release.yaml up -d
sleep 30
docker logs compose_apisix_1
- name: Test route
run: |
grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1
curl http://127.0.0.1:9180/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/get",
"upstream": {
"type": "roundrobin",
"nodes": {
"httpbin.org:80": 1
}
}
}'
result_code=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/get`
if [[ $result_code -ne 200 ]];then
printf "result_code: %s\n" "$result_code"
exit 125
fi
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: push apisix:latest image to docker hub
if: matrix.platform == 'debian'
run: |
make push-multiarch-on-latest
- name: Push apisix:${{ matrix.os }} image to Docker Hub
run: |
make push-multiarch-on-${{ matrix.platform }}