ghcr.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Publish Docker Image
  2. on:
  3. push:
  4. workflow_dispatch:
  5. inputs:
  6. reason:
  7. description: 'Reason for manual trigger'
  8. required: true
  9. default: ''
  10. jobs:
  11. ghcr_build_and_push:
  12. runs-on: ubuntu-latest
  13. if: github.event_name == 'push' || github.event.inputs.reason != ''
  14. strategy:
  15. matrix:
  16. image: ["app", "evaluation", "sandbox"]
  17. steps:
  18. - name: checkout
  19. uses: actions/checkout@v4
  20. - name: Set up QEMU
  21. uses: docker/setup-qemu-action@v3
  22. - name: Set up Docker Buildx
  23. id: buildx
  24. uses: docker/setup-buildx-action@v3
  25. - name: Log-in to ghcr.io
  26. run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
  27. - name: Delete huge unnecessary tools folder
  28. run: rm -rf /opt/hostedtoolcache
  29. - name: Build and push ${{ matrix.image }}
  30. run: |
  31. ORG_NAME=$(echo "${{ github.repository }}" | tr '[A-Z]' '[a-z]' | cut -d '/' -f 1)
  32. ./containers/build.sh ${{ matrix.image }} $ORG_NAME --push