[CI/CD] Test build-image.yaml GitHub action
#5
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 and push image on PR | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "docs/**" | |
| - "**.md" | |
| - ".github/workflows/*" | |
| - "!.github/workflows/publish-chart.yaml" | |
| branches: | |
| - main | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: cleanup disk space | |
| run: | | |
| sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc | |
| df -h | |
| - name: Checkout files in repo | |
| uses: actions/checkout@main | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Set up QEMU (for docker buildx) | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx (for chartpress multi-arch builds) | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Quay.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Build the image and push to quay.io | |
| uses: jupyterhub/repo2docker-action@master | |
| with: | |
| DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }} | |
| DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | |
| DOCKER_REGISTRY: "quay.io" | |
| LATEST_TAG_OFF: true | |
| IMAGE_NAME: "2i2c-org/frx-challenges" | |
| - name: Show how much disk space is left | |
| run: df -h |