name: Docker on: # Scheduled workflows run on the latest commit on the default or base branch schedule: - cron: '20 2 * * *' # Daily at 02:20 push: tags: - v* jobs: publish: # restrict this job to base repo for now if: github.repository == 'opf/openproject' runs-on: ubuntu-latest env: INPUT_BUILDOPTIONS: --pull steps: - uses: actions/checkout@master - name: Prepare docker files run: | cp ./docker/prod/Dockerfile ./Dockerfile - name: Build & Push id: build_and_push uses: elgohr/Publish-Docker-Github-Action@master with: name: openproject/community username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tag_semver: true cache: ${{ github.event_name != 'schedule' }} - name: Test run: | docker run --name openproject -d -p 8080:80 -e SUPERVISORD_LOG_LEVEL=debug -e SECRET_KEY_BASE=secret ${{ steps.build_and_push.outputs.digest }} sleep 30 docker logs openproject --tail 100 wget -O- --retry-on-http-error=503,502 --retry-connrefused http://localhost:8080/api/v3