-
Notifications
You must be signed in to change notification settings - Fork 18
70 lines (69 loc) · 2.36 KB
/
build.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: build
on:
push:
paths-ignore:
- 'README.md'
tags:
- '**'
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: ShubhamTatvamasi/free-disk-space-action@master
- name: Checkout
uses: actions/checkout@v4
- name: Get Version
id: get_version
uses: battila7/get-version-action@v2.3.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
# - name: Cache Docker layers
# uses: actions/cache@v4
# with:
# path: /tmp/.buildx-cache
# key: ${{ runner.os }}-buildx-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUBUNAME }}
password: ${{ secrets.DOCKERHUBTOKEN }}
- name: Build and push shiny
uses: docker/build-push-action@v6
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/arm/v7,linux/arm64,linux/amd64
target: shiny
push: true
tags: |
hvalev/shiny-server-arm:${{ steps.get_version.outputs.version }}
hvalev/shiny-server-arm:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push shiny with devtools
uses: docker/build-push-action@v6
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/arm/v7,linux/arm64,linux/amd64
target: shiny-with-devtools
push: true
tags: |
hvalev/shiny-server-arm:devtools-${{ steps.get_version.outputs.version }}
hvalev/shiny-server-arm:devtools-latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUBUNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUBPWD }}
DOCKERHUB_REPOSITORY: hvalev/shiny-server-arm