Skip to content

Merge pull request #42 from reload/dependabot/github_actions/docker/b… #115

Merge pull request #42 from reload/dependabot/github_actions/docker/b…

Merge pull request #42 from reload/dependabot/github_actions/docker/b… #115

Workflow file for this run

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"