Container Run #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Container Run | |
on: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash -l -o errexit -o pipefail {0} | |
jobs: | |
all: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run container | |
run: | | |
set -o xtrace | |
uname -m | |
curl 'https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64' \ | |
--output '/usr/local/bin/mkcert' | |
chmod +x '/usr/local/bin/mkcert' | |
mkcert -install | |
mkcert -cert-file '/tmp/cert.pem' -key-file '/tmp/key.pem' localhost | |
ls /tmp | |
docker run \ | |
--name httpbun \ | |
--detach \ | |
--publish 443:443 \ | |
--volume /tmp:/tmp:ro \ | |
--env HTTPBUN_TLS_CERT=/tmp/cert.pem \ | |
--env HTTPBUN_TLS_KEY=/tmp/key.pem \ | |
--pull always \ | |
sharat87/httpbun | |
sleep 1 | |
- name: Test | |
run: | | |
set -o errexit | |
set -o xtrace | |
curl --verbose --silent --show-error --fail --location https://localhost/get | |
- name: Logs | |
if: always() | |
run: | | |
docker logs httpbun |