2021-02-01 05:08:16 +00:00
|
|
|
name: e2e
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2021-06-30 07:20:39 +00:00
|
|
|
run-e2e-test:
|
2021-02-01 05:08:16 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-20 15:39:09 +00:00
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-02-01 05:08:16 +00:00
|
|
|
with:
|
2021-12-20 15:39:09 +00:00
|
|
|
fetch-depth: 0
|
|
|
|
-
|
|
|
|
name: Build image
|
|
|
|
uses: docker/bake-action@v1
|
2021-02-01 05:08:16 +00:00
|
|
|
with:
|
2021-12-20 15:39:09 +00:00
|
|
|
targets: image-local
|
|
|
|
-
|
|
|
|
name: Start distribution server
|
2021-02-01 05:08:16 +00:00
|
|
|
run: |
|
|
|
|
IP=`hostname -I | awk '{print $1}'`
|
|
|
|
echo "IP=$IP" >> $GITHUB_ENV
|
|
|
|
echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json
|
|
|
|
sudo service docker restart
|
2021-12-20 15:39:09 +00:00
|
|
|
docker run --rm -p 5000:5000 -p 5001:5001 -idt "registry:local"
|
|
|
|
-
|
|
|
|
name: Tests
|
2021-02-01 05:08:16 +00:00
|
|
|
run: |
|
2021-12-20 15:39:09 +00:00
|
|
|
bash ./tests/push.sh $IP
|