Skip to content

📤 Push images to registry #22

📤 Push images to registry

📤 Push images to registry #22

name: Build and Publish
on:
push:
branches: [main, develop]
pull_request:
jobs:
build-and-push-docker-images:
name: Build and push Docker images
runs-on: ubuntu-latest
steps:
- name: ↙️ Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: ✨ Clean up unnecessary directories
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: ⚙️ Build and push image
run: |
make build-all-images
- name: 📤 Push images
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
run: |
make push-all-images
- name: 🎉 Image digest
run: echo ${{ steps.docker_build.outputs.digest }}