name: docker on: push: branches: [master] pull_request: branches: [master] jobs: docker-bootstrap-node: runs-on: ubuntu-latest steps: - name: Login to DockerHub if: ${{ github.event_name == 'push' }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - uses: actions/checkout@v2 - name: Docker Build run: .github/scripts/tox-bootstrapd-docker local - name: Push latest image to DockerHub if: ${{ github.event_name == 'push' }} run: docker push toxchat/bootstrap-node:latest - name: Push versioned image to DockerHub if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} run: docker push toxchat/bootstrap-node:"$(other/print-version)" docker-toxcore-js: runs-on: ubuntu-latest steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Login to DockerHub if: ${{ github.event_name == 'push' }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v2 with: file: other/emscripten/Dockerfile push: ${{ github.event_name == 'push' }} tags: toxchat/toxcore-js:latest cache-from: type=registry,ref=toxchat/toxcore-js:latest cache-to: type=inline docker-bootstrap-node-websocket: runs-on: ubuntu-latest needs: [docker-bootstrap-node] steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Login to DockerHub if: ${{ github.event_name == 'push' }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v2 with: context: "{{defaultContext}}:other/bootstrap_daemon/websocket" push: ${{ github.event_name == 'push' }} tags: toxchat/bootstrap-node:latest-websocket cache-from: type=registry,ref=toxchat/bootstrap-node:latest-websocket cache-to: type=inline