-
Notifications
You must be signed in to change notification settings - Fork 15
145 lines (140 loc) Β· 4.47 KB
/
buildx.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Buildx
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
pull_request:
branches:
- master
push:
branches:
- master
jobs:
setup:
runs-on: ubuntu-22.04
outputs:
gitRefs: ${{ steps.builds.outputs.gitRefs }}
alpineTasks: ${{ steps.builds.outputs.alpineTasks }}
debianTasks: ${{ steps.builds.outputs.debianTasks }}
steps:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/checkout@v4
- id: builds
run: deno run --allow-net --allow-read --allow-write --allow-env src/main.ts
checkout:
runs-on: ubuntu-22.04
needs:
- setup
strategy:
matrix:
gitRef: ${{ fromJSON(needs.setup.outputs.gitRefs) }}
steps:
- uses: actions/checkout@v4
with:
repository: 'merbanan/rtl_433'
ref: ${{ matrix.gitRef }}
- run: git archive ${{ matrix.gitRef }} --format tar.gz --output ${{ matrix.gitRef }}.tar.gz
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.gitRef }}
path: ${{ matrix.gitRef }}.tar.gz
alpine:
name: ${{ matrix.name }}
needs:
- setup
- checkout
runs-on: ubuntu-22.04
strategy:
matrix:
include: ${{ fromJSON(needs.setup.outputs.alpineTasks) }}
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
version: latest
config-inline: |
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
- if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'hertzg/rtl_433_docker' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.gitRef }}
path: ${{ matrix.context }}
- run: |
cd ${{ matrix.context }}
mkdir rtl_433
tar xf ${{ matrix.gitRef }}.tar.gz --directory ./rtl_433
rm -f ${{ matrix.gitRef }}.tar.gz
- uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.file }}
build-args: ${{ matrix.buildArgs }}
platforms: ${{ matrix.platforms }}
pull: true
push: ${{ github.ref == 'refs/heads/master' || github.event_name == 'schedule' }}
cache-from: ${{ matrix.cacheFrom }}
cache-to: ${{ matrix.cacheTo }}
tags: ${{ matrix.tags }}
debian:
name: ${{ matrix.name }}
needs:
- setup
- checkout
runs-on: ubuntu-22.04
strategy:
matrix:
include: ${{ fromJSON(needs.setup.outputs.debianTasks) }}
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
with:
version: latest
config-inline: |
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
- if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'hertzg/rtl_433_docker' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.gitRef }}
path: ${{ matrix.context }}
- run: |
cd ${{ matrix.context }}
mkdir rtl_433
tar xf ${{ matrix.gitRef }}.tar.gz --directory ./rtl_433
rm -f ${{ matrix.gitRef }}.tar.gz
- uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.file }}
build-args: ${{ matrix.buildArgs }}
platforms: ${{ matrix.platforms }}
pull: true
push: ${{ github.ref == 'refs/heads/master' || github.event_name == 'schedule' }}
cache-from: ${{ matrix.cacheFrom }}
cache-to: ${{ matrix.cacheTo }}
tags: ${{ matrix.tags }}