forked from immortalwrt/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (81 loc) · 3.25 KB
/
rootfs.yml
File metadata and controls
92 lines (81 loc) · 3.25 KB
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
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
name: Build rootfs images
on:
workflow_dispatch:
inputs:
branch:
description: "Source branch"
required: true
default: "master"
version:
description: "Release version"
required: true
default: "snapshot"
jobs:
build:
name: Build rootfs image for ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
#- target: armvirt-32
# arch: arm_cortex-a15_neon-vfpv4
#- target: armvirt-64
# arch: aarch64_cortex-a53
- target: malta-be
arch: mips_24kc
- target: x86-generic
arch: i386_pentium4
- target: x86-geode
arch: i386_pentium-mmx
- target: x86-64
arch: x86_64
steps:
- name: Checkout docker repo
uses: actions/checkout@v3
- name: Download rootfs for ${{ matrix.target }}
run: ./download_files.sh rootfs
env:
TARGET: ${{ matrix.target }}
VERSION: ${{ github.event.inputs.version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push rootfs image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.rootfs
platforms: linux/amd64
push: true
tags: |
gustavo8000br/rootfs:${{ matrix.arch }}-${{ github.event.inputs.branch }}
gustavo8000br/rootfs:${{ matrix.arch }}-${{ github.event.inputs.version }}
gustavo8000br/rootfs:${{ matrix.target }}-${{ github.event.inputs.branch }}
gustavo8000br/rootfs:${{ matrix.target }}-${{ github.event.inputs.version }}
- name: Push extra tags for snapshot
if: ${{ github.event.inputs.version == 'snapshot' }}
run: |
docker tag gustavo8000br/rootfs:${{ matrix.target }}-${{ github.event.inputs.version }} gustavo8000br/rootfs:${{ matrix.arch }}
docker tag gustavo8000br/rootfs:${{ matrix.target }}-${{ github.event.inputs.version }} gustavo8000br/rootfs:${{ matrix.target }}
docker push gustavo8000br/rootfs:${{ matrix.arch }}
docker push gustavo8000br/rootfs:${{ matrix.target }}
- name: Push extra tags for x86-64
if: ${{ matrix.target == 'x86-64' }}
run: |
docker pull gustavo8000br/rootfs:${{ matrix.target }}-${{ github.event.inputs.version }}
docker tag gustavo8000br/rootfs:${{ matrix.target }}-${{ github.event.inputs.version }} gustavo8000br/rootfs:${{ github.event.inputs.branch }}
docker tag gustavo8000br/rootfs:${{ matrix.target }}-${{ github.event.inputs.version }} gustavo8000br/rootfs:${{ github.event.inputs.version }}
docker push gustavo8000br/rootfs:${{ github.event.inputs.branch }}
docker push gustavo8000br/rootfs:${{ github.event.inputs.version }}