-
Notifications
You must be signed in to change notification settings - Fork 25
41 lines (39 loc) · 1.2 KB
/
build_and_publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}