Skip to content

Commit

Permalink
ci: 调试测试流水线&整理文件&尝试修复隔了ingress无法获取真实ip问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Mereithhh committed Aug 27, 2022
1 parent 176e9f5 commit feee634
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/test.yml
Expand Up @@ -8,26 +8,32 @@ permissions:
contents: write

jobs:
release:
runs-on: ubuntu-22.04
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to AliyunCS
uses: docker/login-action@v1
with:
registry: registry.cn-beijing.aliyuncs.com
username: ${{ secrets.ALI_USER }}
password: ${{ secrets.ALI_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: sync-to-aliyuncs
run: |
docker pull docker.io/mereith/van-blog:latest
docker tag "docker.io/mereith/van-blog:latest" "registry.cn-beijing.aliyuncs.com/mereith/van-blog:test"
docker push "registry.cn-beijing.aliyuncs.com/mereith/van-blog:test"
- name: 打包镜像并推送
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
build-args: |
VAN_BLOG_BUILD_SERVER=http://localhost:3000
VAN_BLOG_VERSIONS=test
platforms: linux/amd64
push: true
tags: |
"docker.io/mereith/van-blog:test"
6 changes: 1 addition & 5 deletions Caddyfile
Expand Up @@ -10,11 +10,7 @@
}
}
(h) {
header_up +Host {host}
header_up +X-Real-IP {remote_host}
header_up +X-Forwarded-For {remote_host}
header_up +REMOTE-HOST {remote_host}
header_up +X-Forwarded-Proto {scheme}
trusted_proxies private_ranges
}


Expand Down
6 changes: 1 addition & 5 deletions CaddyfileTemplate
Expand Up @@ -10,11 +10,7 @@
}
}
(h) {
header_up +Host {host}
header_up +X-Real-IP {remote_host}
header_up +X-Forwarded-For {remote_host}
header_up +REMOTE-HOST {remote_host}
header_up +X-Forwarded-Proto {scheme}
trusted_proxies private_ranges
}


Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"release": "standard-version",
"release-doc": "node releaseDoc.js",
"release-doc": "node scripts/releaseDoc.js",
"release-major": "standard-version --release-as major",
"release-minor": "standard-version --release-as minor",
"release-patch": "standard-version --release-as patch",
Expand Down
File renamed without changes.

0 comments on commit feee634

Please sign in to comment.