@marcel91200 / caddy Mirror · read-only / commits / c28cd29f
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 09:15 UTC

ci: enhance the CI/CD flow (#5118)

Mohammed Al Sahaf committed Oct 4, 2022 at 17:03 UTC c28cd29fe7ffc4b7f7bebb16fe721f25abab2446
2 files changed +5 -3
.github/workflows/ci.yml
+4 -3
@@ -156,17 +156,18 @@ jobs:
156 short_sha=$(git rev-parse --short HEAD)
157
158 # The environment is fresh, so there's no point in keeping accepting and adding the key.
159 - rsync -arz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress --delete --exclude '.git' . caddy-ci@ci-s390x.caddyserver.com:/var/tmp/"$short_sha"
160 - ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -t caddy-ci@ci-s390x.caddyserver.com "cd /var/tmp/$short_sha; go version; go env; printf "\n\n";CGO_ENABLED=0 go test -v ./..."
159 + rsync -arz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress --delete --exclude '.git' . "$CI_USER"@ci-s390x.caddyserver.com:/var/tmp/"$short_sha"
160 + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -t "$CI_USER"@ci-s390x.caddyserver.com "cd /var/tmp/$short_sha; go version; go env; printf "\n\n";CGO_ENABLED=0 go test -v ./..."
161 test_result=$?
162
163 # There's no need leaving the files around
164 - ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null caddy-ci@ci-s390x.caddyserver.com "rm -rf /var/tmp/'$short_sha'"
164 + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$CI_USER"@ci-s390x.caddyserver.com "rm -rf /var/tmp/'$short_sha'"
165
166 echo "Test exit code: $test_result"
167 exit $test_result
168 env:
169 SSH_KEY: ${{ secrets.S390X_SSH_KEY }}
170 + CI_USER: ${{ secrets.CI_USER }}
171
172 goreleaser-check:
173 runs-on: ubuntu-latest
.goreleaser.yml
+1
@@ -4,6 +4,7 @@ before:
4 # This is so we can run goreleaser on tag without Git complaining of being dirty. The main.go in cmd/caddy directory
5 # cannot be built within that directory due to changes necessary for the build causing Git to be dirty, which
6 # subsequently causes gorleaser to refuse running.
7 + - rm -rf caddy-build caddy-dist
8 - mkdir -p caddy-build
9 - cp cmd/caddy/main.go caddy-build/main.go
10 - /bin/sh -c 'cd ./caddy-build && go mod init caddy'