|
12 | 12 | name: Run kotlin tests |
13 | 13 | uses: ./.github/workflows/run-kotlin-tests.yml |
14 | 14 |
|
15 | | - publish_docker_image_to_docker_hub: |
16 | | - needs: run_kotlin_tests |
17 | | - name: Build & Push docker image to Docker Hub |
18 | | - runs-on: ubuntu-24.04 |
19 | | - |
20 | | - steps: |
21 | | - - name: Checkout code |
22 | | - uses: actions/checkout@v4 |
23 | | - with: |
24 | | - submodules: recursive |
25 | | - |
26 | | - - name: Extract metadata to env variables |
27 | | - uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1 |
28 | | - |
29 | | - - name: Set up QEMU |
30 | | - uses: docker/setup-qemu-action@v3 |
31 | | - with: |
32 | | - platforms: "arm64" |
33 | | - |
34 | | - - name: Set up Docker Buildx |
35 | | - uses: docker/setup-buildx-action@v3 |
36 | | - |
37 | | - - name: Login to Docker Hub |
38 | | - uses: docker/login-action@v3 |
39 | | - with: |
40 | | - username: ${{ secrets.JORE4_DOCKERHUB_USER }} |
41 | | - password: ${{ secrets.JORE4_DOCKERHUB_TOKEN }} |
42 | | - |
43 | | - - name: Build and push dev builds to Docker Hub |
44 | | - run: | |
45 | | - docker buildx build \ |
46 | | - --push \ |
47 | | - --platform linux/amd64,linux/arm64 \ |
48 | | - --cache-from type=registry,ref=$IMAGE_NAME:builder \ |
49 | | - --cache-to type=registry,ref=$IMAGE_NAME:builder,mode=max \ |
50 | | - --tag $IMAGE_NAME:builder \ |
51 | | - . |
52 | | -
|
53 | | - docker buildx build \ |
54 | | - --push \ |
55 | | - --platform linux/amd64,linux/arm64 \ |
56 | | - --cache-from type=registry,ref=$IMAGE_NAME:builder \ |
57 | | - --tag $IMAGE_NAME:$COMMIT_ID \ |
58 | | - . |
59 | | -
|
60 | | - - name: Build and push :latest tag to Docker Hub |
61 | | - if: ${{ github.ref == 'refs/heads/main' }} |
62 | | - run: | |
63 | | - docker buildx build \ |
64 | | - --push \ |
65 | | - --platform linux/amd64,linux/arm64 \ |
66 | | - --cache-from type=registry,ref=$IMAGE_NAME:builder \ |
67 | | - --tag $IMAGE_NAME:latest \ |
68 | | - . |
69 | | -
|
70 | 15 | publish_docker_image_to_acr: |
71 | 16 | needs: |
72 | 17 | - run_kotlin_tests |
|
0 commit comments