Merge pull request #44 from reload/dependabot/docker/caddy-2.7.6-alpine #119
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
on: push | |
name: Lint | |
jobs: | |
dockerfile-lint: | |
name: dockerfile | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run hadolint | |
uses: hadolint/hadolint-action@v3.1.0 | |
with: | |
trusted-registries: docker.io | |
test: | |
name: Build image and test basic functionality | |
if: '!github.event.deleted' | |
runs-on: ubuntu-latest | |
needs: dockerfile-lint | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Build image and test | |
run: | | |
docker build -t testimage . | |
mkdir srv && sudo chown 1000:1000 srv | |
docker run --name backstore -v $PWD/srv:/srv -d testimage | |
# Give it a chance to boot | |
sleep 3 | |
IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' backstore) | |
docker cp backstore:/srv/.ssh/id_rsa id_rsa | |
echo "This is a test" > testfile | |
rsync --progress -e 'ssh -i id_rsa -p 1984 -o StrictHostKeyChecking=no' -ra testfile store@$IP:backstore/ | |
curl http://$IP/testfile | grep "This is a test" |