name: build-cpu-docker on: push: branches: - ci-train-2 workflow_dispatch: concurrency: group: build-cpu-docker-${{ github.ref }} cancel-in-progress: true jobs: build-cpu-docker: name: ${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest] python-version: ["3.8", "3.9", "3.10"] steps: # refer to https://github.com/actions/checkout - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Free space shell: bash run: | df -h rm -rf /opt/hostedtoolcache df -h - name: 'Login to GitHub Container Registry' uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build docker Image shell: bash run: | cd .github/scripts/docker docker build -t ghcr.io/csukuangfj/icefall:cpu-py${{ matrix.python-version }} --build-arg PYTHON_VERSION=${{ matrix.python-version }} . docker image ls docker push ghcr.io/csukuangfj/icefall:cpu-py${{ matrix.python-version }}