chore(release): 10.0.0-9 #19
Workflow file for this run
This file contains hidden or 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: build-dev-container | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| deployment: | |
| workflow_dispatch: | |
| jobs: | |
| docker-deploy-development-image: | |
| if: github.repository_owner == 'doubtfire-lms' | |
| environment: deployment-secrets | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - dockerfile: dev.Dockerfile | |
| image: lmsdoubtfire/formatif-devcontainer | |
| context: . | |
| - dockerfile: ./doubtfire-api/texlive.Dockerfile | |
| image: lmsdoubtfire/formatif-latex | |
| context: ./doubtfire-api/ | |
| - dockerfile: ./doubtfire-api/jplag.Dockerfile | |
| image: lmsdoubtfire/doubtfire-jplag | |
| context: ./doubtfire-api/ | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup meta for development image | |
| id: docker_meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ matrix.image }} | |
| tags: | | |
| type=semver,pattern={{major}}.{{minor}} | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker | |
| id: buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v3 | |
| with: | |
| path: /tmp/.buildx-cache-app | |
| key: ${{ runner.os }}-buildx-app-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx-app | |
| - name: Build and push dev container image | |
| id: docker_build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| file: ${{ matrix.dockerfile }} | |
| context: ${{ matrix.context }} | |
| builder: ${{ steps.buildx.outputs.name }} | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.docker_meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64,linux/arm64 | |
| cache-from: type=local,src=/tmp/.buildx-cache-app # Reuse cached layers from previous builds. | |
| cache-to: type=local,dest=/tmp/.buildx-cache-app-new,mode=max # Save new cache layers after the build. | |
| - name: Image digest | |
| run: echo ${{ steps.docker_build.outputs.digest }} | |
| - name: Move build cache # Delete the old cache, move the new one in place. | |
| run: | | |
| rm -rf /tmp/.buildx-cache-app | |
| mv /tmp/.buildx-cache-app-new /tmp/.buildx-cache-app |