|
1 | | -name: 'Build core:rpi' |
| 1 | +name: "Build core:rpi" |
2 | 2 |
|
3 | 3 | on: |
4 | | - workflow_dispatch: |
5 | | - schedule: |
6 | | - - cron: '7 5 * * *' |
7 | | - push: |
8 | | - branches-ignore: |
9 | | - - '**' |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: "7 5 * * *" |
| 7 | + push: |
| 8 | + branches-ignore: |
| 9 | + - "**" |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - docker: |
13 | | - runs-on: [self-hosted] |
14 | | - steps: |
15 | | - - name: Checkout |
16 | | - uses: actions/checkout@v2 |
| 12 | + docker: |
| 13 | + runs-on: [self-hosted] |
| 14 | + steps: |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v2 |
17 | 17 |
|
18 | | - - uses: cardinalby/export-env-action@v1 |
19 | | - with: |
20 | | - envFile: '.github_build/Build.alpine.env' |
21 | | - export: 'true' |
22 | | - expandWithJobEnv: 'true' |
23 | | - expand: 'true' |
| 18 | + - uses: cardinalby/export-env-action@v1 |
| 19 | + with: |
| 20 | + envFile: ".github_build/Build.alpine.env" |
| 21 | + export: "true" |
| 22 | + expandWithJobEnv: "true" |
| 23 | + expand: "true" |
24 | 24 |
|
25 | | - - uses: cardinalby/export-env-action@v1 |
26 | | - with: |
27 | | - envFile: '.github_build/Build.bundle.rpi.env' |
28 | | - export: 'true' |
29 | | - expandWithJobEnv: 'true' |
30 | | - expand: 'true' |
| 25 | + - uses: cardinalby/export-env-action@v1 |
| 26 | + with: |
| 27 | + envFile: ".github_build/Build.bundle.rpi.env" |
| 28 | + export: "true" |
| 29 | + expandWithJobEnv: "true" |
| 30 | + expand: "true" |
31 | 31 |
|
32 | | - - name: Set up QEMU |
33 | | - uses: docker/setup-qemu-action@master |
34 | | - with: |
35 | | - platforms: all |
| 32 | + - name: Set up QEMU |
| 33 | + uses: docker/setup-qemu-action@master |
| 34 | + with: |
| 35 | + platforms: all |
36 | 36 |
|
37 | | - - name: Set up Docker Buildx |
38 | | - id: buildx |
39 | | - uses: docker/setup-buildx-action@master |
| 37 | + - name: Set up Docker Buildx |
| 38 | + id: buildx |
| 39 | + uses: docker/setup-buildx-action@master |
40 | 40 |
|
41 | | - - name: Cache Docker layers |
42 | | - uses: actions/cache@v2 |
43 | | - with: |
44 | | - path: /tmp/.buildx-cache |
45 | | - key: ${{ runner.os }}-buildx-${{ github.sha }} |
46 | | - restore-keys: | |
47 | | - ${{ runner.os }}-buildx- |
| 41 | + - name: Cache Docker layers |
| 42 | + uses: actions/cache@v2 |
| 43 | + with: |
| 44 | + path: /tmp/.buildx-cache |
| 45 | + key: ${{ runner.os }}-buildx-${{ github.sha }} |
| 46 | + restore-keys: | |
| 47 | + ${{ runner.os }}-buildx- |
48 | 48 |
|
49 | | - - name: Login to DockerHub |
50 | | - if: github.event_name != 'pull_request' |
51 | | - uses: docker/login-action@v1 |
52 | | - with: |
53 | | - username: ${{ secrets.DOCKER_USERNAME }} |
54 | | - password: ${{ secrets.DOCKER_PASSWORD }} |
| 49 | + - name: Login to DockerHub |
| 50 | + if: github.event_name != 'pull_request' |
| 51 | + uses: docker/login-action@v1 |
| 52 | + with: |
| 53 | + username: ${{ secrets.DOCKER_USERNAME }} |
| 54 | + password: ${{ secrets.DOCKER_PASSWORD }} |
55 | 55 |
|
56 | | - - name: Build Multi-Arch |
57 | | - uses: docker/build-push-action@v2 |
58 | | - with: |
59 | | - builder: ${{ steps.buildx.outputs.name }} |
60 | | - context: . |
61 | | - file: ./Dockerfile.bundle |
62 | | - build-args: | |
63 | | - CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} |
64 | | - FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-rpi-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }} |
65 | | - platforms: linux/arm/v7,linux/arm/v6,linux/arm64 |
66 | | - push: true |
67 | | - tags: | |
68 | | - datarhei/core:rpi-${{ env.CORE_VERSION }} |
69 | | - datarhei/core:rpi-latest |
70 | | - cache-from: type=local,src=/tmp/.buildx-cache |
71 | | - cache-to: type=local,dest=/tmp/.buildx-cache-new |
| 56 | + - name: Build Multi-Arch |
| 57 | + uses: docker/build-push-action@v2 |
| 58 | + with: |
| 59 | + builder: ${{ steps.buildx.outputs.name }} |
| 60 | + context: . |
| 61 | + file: ./Dockerfile.bundle |
| 62 | + build-args: | |
| 63 | + CORE_IMAGE=datarhei/base:${{ env.OS_NAME }}-core-${{ env.OS_VERSION }}-${{ env.CORE_VERSION }} |
| 64 | + FFMPEG_IMAGE=datarhei/base:${{ env.OS_NAME }}-ffmpeg-rpi-${{ env.OS_VERSION }}-${{ env.FFMPEG_VERSION }} |
| 65 | + platforms: linux/arm/v7,linux/arm/v6,linux/arm64 |
| 66 | + push: true |
| 67 | + tags: | |
| 68 | + datarhei/core:rpi-${{ env.CORE_VERSION }} |
| 69 | + datarhei/core:rpi-latest |
| 70 | + cache-from: type=local,src=/tmp/.buildx-cache |
| 71 | + cache-to: type=local,dest=/tmp/.buildx-cache-new |
0 commit comments