-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
56 lines (55 loc) · 1.77 KB
/
action.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
name: "OpenWrt ImageBuilder"
description: "Build OpenWrt Image via the ImageBuilder"
author: aparcar
runs:
using: 'composite'
steps:
- run: |
echo "artifacts_dir=${ARTIFACTS_DIR:-$GITHUB_WORKSPACE}" >> "$GITHUB_OUTPUT"
echo "repo_dir=${REPO_DIR:-$GITHUB_WORKSPACE}" >> "$GITHUB_OUTPUT"
shell: bash
id: inputs
- run: sudo chown -R 1000:1000 ${{ steps.inputs.outputs.artifacts_dir }} ${{ steps.inputs.outputs.repo_dir }}
shell: bash
-
name: Set up Docker QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build Docker container image
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: false
with:
push: false
tags: imagebuilder
context: ${{ github.action_path }}
build-args: |
CONTAINER
ARCH
load: true
- run: |
docker run --rm \
--env EXTRA_REPOS \
--env NO_DEFAULT_REPOS \
--env NO_LOCAL_REPOS \
--env KEY_BUILD \
--env KEY_BUILD_PUB \
--env KEY_VERIFY \
--env NO_SIGNATURE_CHECK \
--env DISABLED_SERVICES \
--env PROFILE \
--env PACKAGES \
--env ROOTFS_SIZE \
-v ${{ steps.inputs.outputs.artifacts_dir }}:/artifacts \
-v ${{ steps.inputs.outputs.repo_dir }}:/repo \
imagebuilder
shell: bash
- run: sudo chown -R --reference=${{ steps.inputs.outputs.artifacts_dir }}/.. ${{ steps.inputs.outputs.artifacts_dir }}
shell: bash
if: always()
- run: sudo chown -R --reference=${{ steps.inputs.outputs.repo_dir }}/.. ${{ steps.inputs.outputs.repo_dir }}
shell: bash
if: always()