Template de compose agregado #5
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: Docker Test | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docker-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Run Docker container | |
run: | | |
docker run -d --name testcontainer alpine tail -f /dev/null | |
- name: Run tests | |
run: | | |
docker exec testcontainer /bin/sh -c " | |
echo 'Ejecutando pruebas...'; | |
cd home | |
mkdir amin | |
cd amin | |
printf 'Este es el contenido del archivo.\nPuede incluir varias líneas.\n' > ejemplo.txt | |
ls -a || exit 1 | |
" |