|
| 1 | +name: proofing |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - 'release/**' |
| 8 | + pull_request: |
| 9 | + |
| 10 | +env: |
| 11 | + GOTOOLCHAIN: local |
| 12 | + |
| 13 | +jobs: |
| 14 | + proofing: |
| 15 | + name: "proofing" |
| 16 | + timeout-minutes: 15 |
| 17 | + runs-on: ubuntu-24.04 |
| 18 | + defaults: |
| 19 | + run: |
| 20 | + shell: bash |
| 21 | + steps: |
| 22 | + - name: "Checkout project" |
| 23 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 24 | + with: |
| 25 | + fetch-depth: 1 |
| 26 | + |
| 27 | + - name: "Install go" |
| 28 | + uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 |
| 29 | + with: |
| 30 | + go-version: 1.24 |
| 31 | + check-latest: true |
| 32 | + |
| 33 | + - name: setup |
| 34 | + run: | |
| 35 | + set -x |
| 36 | +
|
| 37 | + CLI=docker ./mod/proofing/spoof.sh server::start ./pkg/testutil/images.env |
| 38 | +
|
| 39 | + # Check the server is reachable |
| 40 | + curl -iv https://proofing:443/v2 || true |
| 41 | +
|
| 42 | + # Restart services so they catch-up on the system store changes? |
| 43 | + sudo systemctl stop containerd || true |
| 44 | + sudo systemctl start containerd || true |
| 45 | + systemctl --user stop containerd || true |
| 46 | + systemctl --user start containerd || true |
| 47 | + sudo systemctl stop docker || true |
| 48 | + sudo systemctl start docker || true |
| 49 | +
|
| 50 | + make binaries |
| 51 | + sudo -E PATH="_output:$PATH" nerdctl pull debian |
| 52 | + sudo -E PATH="_output:$PATH" nerdctl tag debian proofing:443/debian || true |
| 53 | + sudo -E PATH="_output:$PATH" nerdctl --insecure-registry push proofing:443/debian || true |
| 54 | + sudo -E PATH="_output:$PATH" nerdctl push proofing:443/debian || true |
| 55 | +
|
| 56 | + PATH="_output:$PATH" nerdctl pull debian |
| 57 | + PATH="_output:$PATH" nerdctl tag debian proofing:443/debian || true |
| 58 | + PATH="_output:$PATH" nerdctl --insecure-registry push proofing:443/debian || true |
| 59 | + PATH="_output:$PATH" nerdctl push proofing:443/debian || true |
| 60 | +
|
| 61 | +# sudo -E PATH="_output:$PATH" ./mod/proofing/spoof.sh server::seed ./pkg/testutil/images.env |
| 62 | + - name: test in container |
| 63 | + run: | |
| 64 | + set -x |
| 65 | +
|
| 66 | + docker run -ti debian bash -c -- ' |
| 67 | + ip="$(cat /etc/hosts | grep proofing | awk '{print $1}')" |
| 68 | + ./mod/proofing/spoof.sh guest::configure ./pkg/testutil/images.env "$ip" |
| 69 | + curl -iv "https://docker.io/v2" |
| 70 | + curl -iv "https://proofing/v2" |
| 71 | + ' |
0 commit comments