github.com/cs3org/reva/v2@v2.27.7/.github/workflows/docker.yml (about) 1 name: Build Docker 2 on: 3 push: 4 branches: 5 - "edge" 6 tags: 7 - "*" 8 pull_request: 9 workflow_dispatch: 10 11 jobs: 12 docker: 13 runs-on: self-hosted 14 strategy: 15 matrix: 16 include: 17 - tag: reva:${{ ((github.ref_type == 'tag') && github.ref_name) || 'edge' }} 18 file: Dockerfile.reva 19 - tag: revad:${{ ((github.ref_type == 'tag') && github.ref_name) || 'edge' }} 20 file: Dockerfile.revad 21 - tag: revad:${{ ((github.ref_type == 'tag') && github.ref_name) || 'edge' }}-eos 22 file: Dockerfile.revad-eos 23 - tag: revad:${{ ((github.ref_type == 'tag') && github.ref_name) || 'edge' }}-ceph 24 file: Dockerfile.revad-ceph 25 steps: 26 - name: Checkout 27 uses: actions/checkout@v3 28 - name: Set up QEMU 29 uses: docker/setup-qemu-action@v2 30 - name: Set up Docker Buildx 31 uses: docker/setup-buildx-action@v2 32 - name: Login to Docker Hub 33 uses: docker/login-action@v2 34 if: ${{ github.event_name != 'pull_request' }} 35 with: 36 username: ${{ secrets.DOCKERHUB_USERNAME }} 37 password: ${{ secrets.DOCKERHUB_TOKEN }} 38 - name: Build ${{ ((github.event_name != 'pull_request') && 'and push') || '' }} ${{ matrix.tag }} 39 uses: docker/build-push-action@v3 40 with: 41 context: . 42 push: ${{ github.event_name != 'pull_request' }} 43 file: ${{ matrix.file }} 44 tags: ${{ ((github.event_name != 'pull_request') && format('{0}/{1}', vars.DOCKERHUB_ORGANIZATION, matrix.tag)) || '' }}